Update initial_install/roles/freeipa_client/tasks/main.yml
This commit is contained in:
@@ -28,12 +28,33 @@
|
|||||||
- "--hostname={{ inventory_hostname }}"
|
- "--hostname={{ inventory_hostname }}"
|
||||||
- --mkhomedir
|
- --mkhomedir
|
||||||
- --principal=admin
|
- --principal=admin
|
||||||
- --password={{ ipa_admin_password }}
|
- "--password={{ ipa_admin_password }}"
|
||||||
- --unattended
|
- --unattended
|
||||||
- --force-join
|
- --force-join
|
||||||
no_log: false
|
no_log: false
|
||||||
when: not ipa_client_conf.stat.exists
|
when: not ipa_client_conf.stat.exists
|
||||||
|
|
||||||
|
- name: Check current sudo alternative
|
||||||
|
ansible.builtin.command:
|
||||||
|
argv:
|
||||||
|
- update-alternatives
|
||||||
|
- --query
|
||||||
|
- sudo
|
||||||
|
register: sudo_alternative
|
||||||
|
changed_when: false
|
||||||
|
when: ansible_distribution == "Ubuntu"
|
||||||
|
|
||||||
|
- name: Switch to classic sudo
|
||||||
|
ansible.builtin.command:
|
||||||
|
argv:
|
||||||
|
- update-alternatives
|
||||||
|
- --set
|
||||||
|
- sudo
|
||||||
|
- /usr/bin/sudo.ws
|
||||||
|
when:
|
||||||
|
- ansible_distribution == "Ubuntu"
|
||||||
|
- "'Value: /usr/bin/sudo.ws' not in sudo_alternative.stdout"
|
||||||
|
|
||||||
- name: Prioritize SSS over local accounts in NSS
|
- name: Prioritize SSS over local accounts in NSS
|
||||||
ansible.builtin.lineinfile:
|
ansible.builtin.lineinfile:
|
||||||
path: /etc/nsswitch.conf
|
path: /etc/nsswitch.conf
|
||||||
|
|||||||
Reference in New Issue
Block a user