ipaclient_setup_ssh: Keep no_ for prefix for settings, use ssh_trust_dns

The no_ prefix for the ssh and sshd settings has been added back. The
naming of the settings should be the same all over the ipcalient role.
The exception is sssd here as it has been deprected and is used from
ipaclient_test.

The name for the setting ssh_trust_dns has been fixed to the command line
option name and not the internl optinos name.
This commit is contained in:
Thomas Woerner
2019-03-25 14:52:39 +01:00
parent 2983d4e7b3
commit d0ba53153e
2 changed files with 11 additions and 9 deletions

View File

@@ -84,9 +84,9 @@ def main():
module = AnsibleModule(
argument_spec = dict(
servers=dict(required=True, type='list'),
ssh=dict(required=False, type='bool', default='no'),
trust_sshfp=dict(required=False, type='bool', default='no'),
sshd=dict(required=False, type='bool', default='no'),
no_ssh=dict(required=False, type='bool', default='no'),
ssh_trust_dns=dict(required=False, type='bool', default='no'),
no_sshd=dict(required=False, type='bool', default='no'),
sssd=dict(required=False, type='bool', default='no'),
),
supports_check_mode = True,
@@ -95,9 +95,11 @@ def main():
module._ansible_debug = True
options.servers = module.params.get('servers')
options.server = options.servers
options.conf_ssh = module.params.get('ssh')
options.trust_sshfp = module.params.get('trust_sshfp')
options.conf_sshd = module.params.get('sshd')
options.no_ssh = module.params.get('no_ssh')
options.conf_ssh = not options.no_ssh
options.trust_sshfp = module.params.get('ssh_trust_dns')
options.no_sshd = module.params.get('no_sshd')
options.conf_sshd = not options.no_sshd
options.sssd = module.params.get('sssd')
fstore = sysrestore.FileStore(paths.IPA_CLIENT_SYSRESTORE)

View File

@@ -287,9 +287,9 @@
ipaclient_setup_ssh:
servers: "{{ result_ipaclient_test.servers }}"
sssd: "{{ result_ipaclient_test.sssd }}"
ssh: "{{ not ipaclient_no_ssh }}"
trust_sshfp: "{{ ipaclient_ssh_trust_dns }}"
sshd: "{{ not ipaclient_no_sshd }}"
no_ssh: "{{ ipaclient_no_ssh }}"
ssh_trust_dns: "{{ ipaclient_ssh_trust_dns }}"
no_sshd: "{{ ipaclient_no_sshd }}"
- name: Install - Configure automount
ipaclient_setup_automount: