This commit is contained in:
parent
71a205a1a4
commit
a769494bc7
@ -28,12 +28,12 @@
|
|||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
join_passw: "{{ lookup('env', 'JOIN_PASSW') }}"
|
join_passw: "{{ lookup('env', 'JOIN_PASSW') }}"
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
when: checkjoined.found == 0
|
when: found in checkjoined and checkjoined.found == 0
|
||||||
|
|
||||||
- name: Join to AD with realmd
|
- name: Join to AD with realmd
|
||||||
ansible.builtin.shell:
|
ansible.builtin.shell:
|
||||||
cmd: echo {{ join_passw }} | realm join -v -U tormakris_admin intra.tormakris.dev
|
cmd: echo {{ join_passw }} | realm join -v -U tormakris_admin intra.tormakris.dev
|
||||||
when: checkjoined.found == 0
|
when: found in checkjoined and checkjoined.found == 0
|
||||||
|
|
||||||
- name: Enable pam homedir create on first logon
|
- name: Enable pam homedir create on first logon
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
@ -53,7 +53,7 @@
|
|||||||
state: present
|
state: present
|
||||||
path: /etc/sssd/sssd.conf
|
path: /etc/sssd/sssd.conf
|
||||||
line: "ad_gpo_access_control = disabled"
|
line: "ad_gpo_access_control = disabled"
|
||||||
when: checkadgpoac.found == 0
|
when: found in checkadgpoac and checkadgpoac.found == 0
|
||||||
|
|
||||||
- name: Check if ad_access_filter is set
|
- name: Check if ad_access_filter is set
|
||||||
ansible.builtin.lineinfile:
|
ansible.builtin.lineinfile:
|
||||||
@ -69,7 +69,7 @@
|
|||||||
state: present
|
state: present
|
||||||
path: /etc/sssd/sssd.conf
|
path: /etc/sssd/sssd.conf
|
||||||
line: "ad_access_filter = memberOf=CN=LinuxUsers,OU=Service Groups,DC=intra,DC=tormakris,DC=dev"
|
line: "ad_access_filter = memberOf=CN=LinuxUsers,OU=Service Groups,DC=intra,DC=tormakris,DC=dev"
|
||||||
when: checkadaf.found == 0
|
when: found in checkadaf and checkadaf.found == 0
|
||||||
|
|
||||||
- name: "Restart sssd"
|
- name: "Restart sssd"
|
||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
@ -90,5 +90,5 @@
|
|||||||
state: present
|
state: present
|
||||||
path: /etc/sudoers
|
path: /etc/sudoers
|
||||||
line: "%linuxadmins@intra.tormakris.dev ALL=(ALL) NOPASSWD: ALL"
|
line: "%linuxadmins@intra.tormakris.dev ALL=(ALL) NOPASSWD: ALL"
|
||||||
when: checksudoers.found == 0
|
when: found in checksudoers and checksudoers.found == 0
|
||||||
...
|
...
|
||||||
|
Loading…
Reference in New Issue
Block a user