Skip to content
Snippets Groups Projects
Unverified Commit 24e05d1d authored by Rafael Guterres Jeffman's avatar Rafael Guterres Jeffman Committed by GitHub
Browse files

Merge pull request #1067 from t-woerner/ipaclient_ipaclient_defer_krb5_configuration_fix

ipaclient: Defer krb5 configuration fix
parents 065e9021 10d072a8
No related branches found
No related tags found
No related merge requests found
...@@ -54,6 +54,10 @@ options: ...@@ -54,6 +54,10 @@ options:
the host entry will not be changed on the server the host entry will not be changed on the server
type: bool type: bool
required: yes required: yes
krb_name:
description: The krb5 config file name
type: str
required: yes
author: author:
- Thomas Woerner (@t-woerner) - Thomas Woerner (@t-woerner)
''' '''
...@@ -65,6 +69,7 @@ EXAMPLES = ''' ...@@ -65,6 +69,7 @@ EXAMPLES = '''
realm: EXAMPLE.COM realm: EXAMPLE.COM
basedn: dc=example,dc=com basedn: dc=example,dc=com
allow_repair: yes allow_repair: yes
krb_name: /tmp/tmpkrb5.conf
''' '''
RETURN = ''' RETURN = '''
...@@ -87,6 +92,7 @@ def main(): ...@@ -87,6 +92,7 @@ def main():
realm=dict(required=True, type='str'), realm=dict(required=True, type='str'),
basedn=dict(required=True, type='str'), basedn=dict(required=True, type='str'),
allow_repair=dict(required=True, type='bool'), allow_repair=dict(required=True, type='bool'),
krb_name=dict(required=True, type='str'),
), ),
) )
...@@ -98,6 +104,8 @@ def main(): ...@@ -98,6 +104,8 @@ def main():
realm = module.params.get('realm') realm = module.params.get('realm')
basedn = module.params.get('basedn') basedn = module.params.get('basedn')
allow_repair = module.params.get('allow_repair') allow_repair = module.params.get('allow_repair')
krb_name = module.params.get('krb_name')
os.environ['KRB5_CONFIG'] = krb_name
env = {'PATH': SECURE_PATH} env = {'PATH': SECURE_PATH}
fstore = sysrestore.FileStore(paths.IPA_CLIENT_SYSRESTORE) fstore = sysrestore.FileStore(paths.IPA_CLIENT_SYSRESTORE)
......
...@@ -152,6 +152,10 @@ options: ...@@ -152,6 +152,10 @@ options:
The dist of nss_ldap or nss-pam-ldapd files if sssd is disabled The dist of nss_ldap or nss-pam-ldapd files if sssd is disabled
required: yes required: yes
type: dict type: dict
krb_name:
description: The krb5 config file name
type: str
required: yes
author: author:
- Thomas Woerner (@t-woerner) - Thomas Woerner (@t-woerner)
''' '''
...@@ -167,6 +171,7 @@ EXAMPLES = ''' ...@@ -167,6 +171,7 @@ EXAMPLES = '''
subject_base: O=EXAMPLE.COM subject_base: O=EXAMPLE.COM
principal: admin principal: admin
ca_enabled: yes ca_enabled: yes
krb_name: /tmp/tmpkrb5.conf
''' '''
RETURN = ''' RETURN = '''
...@@ -218,6 +223,7 @@ def main(): ...@@ -218,6 +223,7 @@ def main():
no_krb5_offline_passwords=dict(required=False, type='bool'), no_krb5_offline_passwords=dict(required=False, type='bool'),
no_dns_sshfp=dict(required=False, type='bool', default=False), no_dns_sshfp=dict(required=False, type='bool', default=False),
nosssd_files=dict(required=True, type='dict'), nosssd_files=dict(required=True, type='dict'),
krb_name=dict(required=True, type='str'),
), ),
supports_check_mode=False, supports_check_mode=False,
) )
...@@ -268,6 +274,8 @@ def main(): ...@@ -268,6 +274,8 @@ def main():
options.sssd = not options.no_sssd options.sssd = not options.no_sssd
options.no_ac = False options.no_ac = False
nosssd_files = module.params.get('nosssd_files') nosssd_files = module.params.get('nosssd_files')
krb_name = module.params.get('krb_name')
os.environ['KRB5_CONFIG'] = krb_name
# pylint: disable=invalid-name # pylint: disable=invalid-name
CCACHE_FILE = paths.IPA_DNS_CCACHE CCACHE_FILE = paths.IPA_DNS_CCACHE
......
...@@ -346,6 +346,7 @@ ...@@ -346,6 +346,7 @@
realm: "{{ result_ipaclient_test.realm }}" realm: "{{ result_ipaclient_test.realm }}"
basedn: "{{ result_ipaclient_test.basedn }}" basedn: "{{ result_ipaclient_test.basedn }}"
allow_repair: "{{ ipaclient_allow_repair }}" allow_repair: "{{ ipaclient_allow_repair }}"
krb_name: "{{ result_ipaclient_temp_krb5.krb_name }}"
when: not ipaclient_on_master | bool and when: not ipaclient_on_master | bool and
result_ipaclient_test_keytab.krb5_keytab_ok and result_ipaclient_test_keytab.krb5_keytab_ok and
not result_ipaclient_test_keytab.ca_crt_exists not result_ipaclient_test_keytab.ca_crt_exists
...@@ -382,6 +383,7 @@ ...@@ -382,6 +383,7 @@
| default(ipasssd_no_krb5_offline_passwords) }}" | default(ipasssd_no_krb5_offline_passwords) }}"
no_dns_sshfp: "{{ ipaclient_no_dns_sshfp }}" no_dns_sshfp: "{{ ipaclient_no_dns_sshfp }}"
nosssd_files: "{{ result_ipaclient_test.nosssd_files }}" nosssd_files: "{{ result_ipaclient_test.nosssd_files }}"
krb_name: "{{ result_ipaclient_temp_krb5.krb_name }}"
- name: Install - Configure SSH and SSHD - name: Install - Configure SSH and SSHD
ipaclient_setup_ssh: ipaclient_setup_ssh:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment