diff --git a/roles/ipaclient/action_plugins/ipaclient_get_otp.py b/roles/ipaclient/action_plugins/ipaclient_get_otp.py index c0c5aec6c7c60410155200cc82d83f9cd132901b..90086b9f4380fc5ca32d2fd484d331908c5b5e8c 100644 --- a/roles/ipaclient/action_plugins/ipaclient_get_otp.py +++ b/roles/ipaclient/action_plugins/ipaclient_get_otp.py @@ -155,8 +155,6 @@ class ActionModule(ActionBase): keytab = self._task.args.get('keytab', None) password = self._task.args.get('password', None) lifetime = self._task.args.get('lifetime', '1h') - ansible_python_interpreter = self._task.args.get('ansible_python_interpreter', None) - task_vars["ansible_python_interpreter"] = ansible_python_interpreter if (not keytab and not password): result['failed'] = True @@ -169,7 +167,7 @@ class ActionModule(ActionBase): return result data = self._execute_module(module_name='ipaclient_get_facts', module_args=dict(), - task_vars={ "ansible_python_interpreter": ansible_python_interpreter }) + task_vars=None) try: domain = data['ansible_facts']['ipa']['domain'] realm = data['ansible_facts']['ipa']['realm'] diff --git a/roles/ipaclient/library/ipaclient_get_otp.py b/roles/ipaclient/library/ipaclient_get_otp.py index 8435699343a85b6e2739cfcdcc1888a15295019f..49fe40a078209eacdad96ec36f357294fb626b1b 100644 --- a/roles/ipaclient/library/ipaclient_get_otp.py +++ b/roles/ipaclient/library/ipaclient_get_otp.py @@ -71,9 +71,6 @@ options: ipaddress: description: the IP address for the host required: false - ansible_python_interpreter: - desciption: The ansible python interpreter used in the action plugin part, ignored here - required: false requirements: - gssapi on the Ansible controller @@ -318,7 +315,6 @@ def main(): ipaddress = dict(required=False), random = dict(default=False, type='bool'), state = dict(default='present', choices=[ 'present', 'absent' ]), - ansible_python_interpreter = dict(required=False), ), supports_check_mode=True, ) diff --git a/roles/ipaclient/tasks/install.yml b/roles/ipaclient/tasks/install.yml index d84f899b9f5d3316d6bd13c6d32f9f27bf1574d0..0098af8b1bb2dddd1a197cdb72d3c5e004165a75 100644 --- a/roles/ipaclient/tasks/install.yml +++ b/roles/ipaclient/tasks/install.yml @@ -107,10 +107,6 @@ fail: msg="Keytab or password is required for otp" when: ipaadmin_keytab is undefined and ipaadmin_password is undefined - - name: Install - Save client ansible_python_interpreter setting - set_fact: - ipaclient_ansible_python_interpreter: "{{ ansible_python_interpreter }}" - #- name: Install - Include Python2/3 import test # import_tasks: "{{ role_path }}/tasks/python_2_3_test.yml" # delegate_to: "{{ result_ipaclient_test.servers[0] }}" @@ -125,7 +121,6 @@ fqdn: "{{ result_ipaclient_test.hostname }}" lifetime: "{{ ipaclient_lifetime | default(omit) }}" random: True - ansible_python_interpreter: "{{ ansible_python_interpreter }}" register: result_ipaclient_get_otp # If the host is already enrolled, this command will exit on error # The error can be ignored @@ -142,10 +137,6 @@ ipaadmin_password: "{{ result_ipaclient_get_otp.host.randompassword if result_ipaclient_get_otp.host is defined }}" - - name: Install - Restore client ansible_python_interpreter setting - set_fact: - ansible_python_interpreter: "{{ ipaclient_ansible_python_interpreter }}" - when: ipaclient_use_otp | bool - block: