Update initial_install/roles/freeipa_client/tasks/main.yml
This commit is contained in:
@@ -28,12 +28,33 @@
|
||||
- "--hostname={{ inventory_hostname }}"
|
||||
- --mkhomedir
|
||||
- --principal=admin
|
||||
- --password={{ ipa_admin_password }}
|
||||
- "--password={{ ipa_admin_password }}"
|
||||
- --unattended
|
||||
- --force-join
|
||||
no_log: false
|
||||
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
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/nsswitch.conf
|
||||
|
||||
Reference in New Issue
Block a user