Ansible service handlers
# RHEL 6 and 7 Set correct permissions
- name: RHEL 6 and 7 Set correct permissions
file:
path: /etc/nslcd.conf
mode: '0600'
notify: restart nslcd
when: (ansible_facts['distribution_major_version'] == "6") or (ansible_facts['distribution_major_version'] == "7")
# Restart handlers
handlers:
- name: restart nscd
service:
name: nscd
state: restarted
- name: restart nslcd
service:
name: nslcd
state: restarted