Getting started
Example inventory
To enable the nscd service on a host, you need to add it to the
[debops_service_nscd]
Ansible inventory group.
[debops_service_nscd]
hostname
A common case is configuration of LDAP authentication in the entire cluster of hosts. You can enable debops.nscd role on all DebOps hosts in the Ansible inventory at once:
[debops_all_hosts]
hostname1
hostname2
[debops_service_nscd:children]
debops_all_hosts
The nscd service can also be installed and configured by other
playbooks, for example bootstrap-ldap.yml
. In such cases the custom
playbook will configure the nscd service on a host, but the role
playbook will not work on a host automatically; you will have to include that
host in the [debops_service_nscd]
Ansible inventory group via one of the
methods above to be able to change the service configuration.
Example playbook
If you are using this role without DebOps, here's an example Ansible playbook
that uses the debops.nscd
role:
---
- name: Manage Name Service Cache Daemon
collections: [ 'debops.debops', 'debops.roles01',
'debops.roles02', 'debops.roles03' ]
hosts: [ 'debops_service_nscd' ]
become: True
environment: '{{ inventory__environment | d({})
| combine(inventory__group_environment | d({}))
| combine(inventory__host_environment | d({})) }}'
roles:
- role: nscd
tags: [ 'role::nscd', 'skip::nscd' ]
Other resources
List of other useful resources related to the debops.nscd
Ansible role:
Manual pages: nscd.conf(5)