initial
This commit is contained in:
+63
@@ -0,0 +1,63 @@
|
||||
---
|
||||
- name: Sync Configuration Files
|
||||
hosts: servers
|
||||
become: yes
|
||||
vars:
|
||||
worker_limit: 1024 # Global variable used in the template
|
||||
|
||||
tasks:
|
||||
- name: Deploy sssd.conf
|
||||
template:
|
||||
src: templates/sssd.conf
|
||||
dest: /etc/sssd/conf.d/sssd.conf
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0600'
|
||||
notify: Restart sssd # This triggers the handler only if the file changes
|
||||
|
||||
- name: Deploy ldap.conf
|
||||
template:
|
||||
src: templates/ldap.conf
|
||||
dest: /etc/openldap/ldap.conf
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
|
||||
- name: Deploy sshd.conf
|
||||
template:
|
||||
src: templates/sshd.conf
|
||||
dest: /etc/ssh/sshd_config.d/60_lab.conf
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0600'
|
||||
|
||||
- name: Deploy ssh.conf
|
||||
template:
|
||||
src: templates/ssh.conf
|
||||
dest: /etc/ssh/ssh_config.d/60_lab.conf
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
|
||||
- name: Deploy sudoers
|
||||
template:
|
||||
src: templates/lab-sudo
|
||||
dest: /etc/sudoers.d/sudogroup
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
|
||||
- name: Root password
|
||||
user:
|
||||
name: root
|
||||
password: "$6$OJEdzUbqfQR72WjX$SFMnDZ0MXM7JfYKPvvN0nJIPetzrWQw/0q360xgR9mwJVwrme4dt9hhtH95yytn8Ln0.0koVCno6vskylJFm5."
|
||||
|
||||
- name: Disable SELinux
|
||||
ansible.builtin.selinux:
|
||||
state: disabled
|
||||
|
||||
handlers:
|
||||
- name: Restart sssd
|
||||
service:
|
||||
name: sssd
|
||||
state: restarted
|
||||
Reference in New Issue
Block a user