From d0ba53153ecf174a65ce98953ec45114f61b5a5e Mon Sep 17 00:00:00 2001 From: Thomas Woerner <twoerner@redhat.com> Date: Mon, 25 Mar 2019 14:52:39 +0100 Subject: [PATCH] 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. --- roles/ipaclient/library/ipaclient_setup_ssh.py | 14 ++++++++------ roles/ipaclient/tasks/install.yml | 6 +++--- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/roles/ipaclient/library/ipaclient_setup_ssh.py b/roles/ipaclient/library/ipaclient_setup_ssh.py index ec886bfc..9aefac9d 100644 --- a/roles/ipaclient/library/ipaclient_setup_ssh.py +++ b/roles/ipaclient/library/ipaclient_setup_ssh.py @@ -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) diff --git a/roles/ipaclient/tasks/install.yml b/roles/ipaclient/tasks/install.yml index a9a06702..069966a3 100644 --- a/roles/ipaclient/tasks/install.yml +++ b/roles/ipaclient/tasks/install.yml @@ -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: -- GitLab