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