Commit 3e7b9536 authored by klafyvel's avatar klafyvel

make rezo_basic idempotent

parent 658d9667
- name: Install libnss-ldapd
apt:
name: libnss-ldapd,libpam-ldapd,nslcd
- name: Stop nscd service
service:
name: nscd
state: stopped
- name: Copy nsswitch.conf
copy:
dest: /etc/nsswitch.conf
src: nsswitch.conf
mode: 0640
register: nsswitch
- name: configure nslcd
template:
src: nslcd.conf.j2
dest: /etc/nslcd.conf
mode: 0640
register: nslcd
- name: Restart nslcd service
service:
name: nslcd
state: restarted
- name: Start nscd service
when: nsswitch.changed or nslcd.changed
- name: Restart nscd service
service:
name: nscd
state: started
when: nsswitch.changed or nslcd.changed
- name: Allow rezo group to ssh on the server
lineinfile:
dest: /etc/ssh/sshd_config
line: AllowGroups ssh rezo
register: allow_rezo
- name: Add root to the ssh group
user:
name: root
group: ssh
append: yes
register: root_ssh
- name: Restart ssh
service:
name: ssh
state: restarted
when: allow_rezo.changed or root_ssh.changed
- name: Create /home/ at first login
lineinfile:
dest: /etc/pam.d/common-session
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment