Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 82ad37e7ae | |||
| 905e3f597c | |||
| 704eff293a | |||
| 04cbc15b8e | |||
| d91c30c509 | |||
| 4e762abd6f | |||
| 40d7560e44 |
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
- name: Set hostname FQDN
|
- name: Set hostname FQDN
|
||||||
ansible.builtin.hostname:
|
ansible.builtin.hostname:
|
||||||
name: "{{ inventory_hostname }}.im.lab"
|
name: "{{ inventory_hostname }}"
|
||||||
|
|
||||||
- name: Check if FreeIPA client is already configured
|
- name: Check if FreeIPA client is already configured
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
@@ -25,15 +25,36 @@
|
|||||||
- --domain=im.lab
|
- --domain=im.lab
|
||||||
- --realm=IM.LAB
|
- --realm=IM.LAB
|
||||||
- --server=ipa.im.lab
|
- --server=ipa.im.lab
|
||||||
- "--hostname={{ inventory_hostname }}.im.lab"
|
- "--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
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[linux_servers_jim]
|
[linux_servers_jim]
|
||||||
jimbuntu ansible_host=192.168.19.4
|
jimbuntu ansible_host=192.168.19.4
|
||||||
portainernode2_jim ansible_host=192.168.19.8
|
portainer2-jim.im.lab ansible_host=192.168.19.8
|
||||||
galera3 ansible_host=192.168.19.92
|
galera3 ansible_host=192.168.19.92
|
||||||
galera2 ansible_host=192.168.19.91
|
galera2 ansible_host=192.168.19.91
|
||||||
testipaclient ansible_host=192.168.19.98
|
testipaclient ansible_host=192.168.19.98
|
||||||
|
|||||||
Reference in New Issue
Block a user