feat(nslcd): add role

This commit is contained in:
2022-11-05 12:15:13 +01:00
parent c31e13a975
commit fb13bd55bf
4 changed files with 64 additions and 0 deletions

View File

@ -0,0 +1,27 @@
---
- name: Ensure nslcd is installed
apt:
name: "{{ nslcd_apt_package_name }}"
state: present
when: ansible_facts['pkg_mgr'] == 'apt'
- name: Ensure config is templated
template:
src: nslcd.conf.j2
dest: /etc/nslcd.conf
owner: root
group: root
mode: "0640"
- name: Ensure systemd service is enabled
systemd:
service: "{{ nslcd_systemd_service_name }}"
enabled: true
when: ansible_facts['service_mgr'] == 'systemd'
- name: Ensure systemd service is running
systemd:
service: "{{ nslcd_systemd_service_name }}"
state: started
when: ansible_facts['service_mgr'] == 'systemd'