8025-awxRefactor #26

Merged
juan merged 20 commits from 8025-awxRefactor into main 2024-09-24 13:51:24 +00:00
2 changed files with 44 additions and 6 deletions
Showing only changes of commit fffa279650 - Show all commits

View File

@ -0,0 +1,8 @@
- name: restart-nslcd
service:
name: nslcd
state: restarted
- name: restart-autofs
service:
name: autofs
state: restarted

View File

@ -1,8 +1,38 @@
- name: Restart nslcd - name: Install autofs packages
service: apt:
name: nslcd name: "{{ item }}"
state: restarted state: present
- name: Restart autofs with_items:
- nfs-common
- autofs
- libnfs-utils
- autofs-ldap
- name: Create homes directory
ansible.builtin.file:
path: "{{ homes_path }}"
state: directory
mode: '0755'
- name: Configure nsswitch for autofs
lineinfile:
path: /etc/nsswitch.conf
line: "automount: files"
notify: restart-nslcd
- name: Add file homes.autofs configured to autofs
copy:
src: homes.autofs
dest: /etc/auto.master.d/homes.autofs
owner: root
group: root
mode: '0644'
- name: Add file /etc/auto.homes configured to the systemd
copy:
src: auto.homes
dest: /etc/auto.homes
owner: root
group: root
mode: '0644'
notify: restart-autofs
- name: Service autofs service
service: service:
name: autofs name: autofs
state: restarted enabled: yes