autofs: Convert modules to use FQCN
This commit is contained in:
parent
71c35faa3e
commit
2ac8d539be
2 changed files with 11 additions and 11 deletions
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: restart autofs
|
- name: restart autofs
|
||||||
service:
|
ansible.builtin.service:
|
||||||
name: autofs
|
name: autofs
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
|
@ -1,24 +1,24 @@
|
||||||
---
|
---
|
||||||
- name: install packages
|
- name: install packages
|
||||||
package:
|
ansible.builtin.package:
|
||||||
name: autofs
|
name: autofs
|
||||||
state: installed
|
state: installed
|
||||||
|
|
||||||
- name: allow nfs home directories for selinux
|
- name: allow nfs home directories for selinux
|
||||||
seboolean:
|
ansible.posix.seboolean:
|
||||||
name: use_nfs_home_dirs
|
name: use_nfs_home_dirs
|
||||||
state: true
|
state: true
|
||||||
persistent: true
|
persistent: true
|
||||||
|
|
||||||
- name: configure ldap server for autofs
|
- name: configure ldap server for autofs
|
||||||
lineinfile:
|
ansible.builtin.lineinfile:
|
||||||
dest: /etc/autofs.conf
|
dest: /etc/autofs.conf
|
||||||
regexp: '^#?ldap_uri\s*=.*'
|
regexp: '^#?ldap_uri\s*=.*'
|
||||||
line: "ldap_uri = {% for u in ldap_server %}ldaps://{{ u }} {% endfor %}"
|
line: "ldap_uri = {% for u in ldap_server %}ldaps://{{ u }} {% endfor %}"
|
||||||
notify: restart autofs
|
notify: restart autofs
|
||||||
|
|
||||||
- name: configure ldap schema for autofs
|
- name: configure ldap schema for autofs
|
||||||
lineinfile:
|
ansible.builtin.lineinfile:
|
||||||
dest: /etc/autofs.conf
|
dest: /etc/autofs.conf
|
||||||
line: "{{ item }}"
|
line: "{{ item }}"
|
||||||
insertbefore: "^# auth_conf_file"
|
insertbefore: "^# auth_conf_file"
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
- map_object_class = organizationalUnit
|
- map_object_class = organizationalUnit
|
||||||
|
|
||||||
- name: configure ldap auth for autofs
|
- name: configure ldap auth for autofs
|
||||||
template:
|
ansible.builtin.template:
|
||||||
dest: /etc/autofs_ldap_auth.conf
|
dest: /etc/autofs_ldap_auth.conf
|
||||||
src: autofs_ldap_auth.conf.j2
|
src: autofs_ldap_auth.conf.j2
|
||||||
mode: 0600
|
mode: 0600
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
notify: restart autofs
|
notify: restart autofs
|
||||||
|
|
||||||
- name: create auto.master config
|
- name: create auto.master config
|
||||||
template:
|
ansible.builtin.template:
|
||||||
dest: /etc/auto.master
|
dest: /etc/auto.master
|
||||||
src: auto.master.j2
|
src: auto.master.j2
|
||||||
mode: 0644
|
mode: 0644
|
||||||
|
@ -49,20 +49,20 @@
|
||||||
notify: restart autofs
|
notify: restart autofs
|
||||||
|
|
||||||
- name: start autofs service
|
- name: start autofs service
|
||||||
service:
|
ansible.builtin.service:
|
||||||
name: autofs
|
name: autofs
|
||||||
state: started
|
state: started
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
||||||
- name: disable authorized_keys file from users
|
- name: disable authorized_keys file from users
|
||||||
lineinfile:
|
ansible.builtin.lineinfile:
|
||||||
path: /etc/ssh/sshd_config
|
path: /etc/ssh/sshd_config
|
||||||
line: AuthorizedKeysFile none
|
line: AuthorizedKeysFile none
|
||||||
regexp: '^AuthorizedKeysFile\s+.*'
|
regexp: '^AuthorizedKeysFile\s+.*'
|
||||||
notify: restart sshd
|
notify: restart sshd
|
||||||
|
|
||||||
- name: enable authorized_keys file for root
|
- name: enable authorized_keys file for root
|
||||||
blockinfile:
|
ansible.builtin.blockinfile:
|
||||||
path: /etc/ssh/sshd_config
|
path: /etc/ssh/sshd_config
|
||||||
block: |
|
block: |
|
||||||
Match User root
|
Match User root
|
||||||
|
@ -71,7 +71,7 @@
|
||||||
notify: restart sshd
|
notify: restart sshd
|
||||||
|
|
||||||
- name: move user cache from home directory to tmpfs
|
- name: move user cache from home directory to tmpfs
|
||||||
copy:
|
ansible.builtin.copy:
|
||||||
dest: "/etc/profile.d/{{ item }}"
|
dest: "/etc/profile.d/{{ item }}"
|
||||||
src: "{{ item }}"
|
src: "{{ item }}"
|
||||||
mode: 0644
|
mode: 0644
|
||||||
|
|
Loading…
Add table
Reference in a new issue