1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_avahi_client.git synced 2024-08-16 16:09:49 +02:00

configure nsswitch.conf

This commit is contained in:
L3D 2021-09-02 02:42:00 +02:00
parent c699212b6d
commit a685712bc1
Signed by: l3d
GPG key ID: CD08445BFF4313D1
8 changed files with 46 additions and 1 deletions

View file

@ -1,3 +1,6 @@
---
# deploy custom /etc/nsswitch.conf config
avahi__configure_nsswitch: true
# should we do a version check? (recomended)
submodules_versioncheck: false

View file

@ -11,3 +11,7 @@
- name: install mdns requirements
ansible.builtin.include_tasks: install.yml
- name: configure /etc/nsswitch.conf
ansible.builtin.include_tasks: nsswitch.yml
when: avahi__configure_nsswitch | bool

9
tasks/nsswitch.yml Normal file
View file

@ -0,0 +1,9 @@
---
- name: deploy /etc/nsswitch.conf
become: true
ansible.builtin.template:
src: 'templates/nsswitch.conf.j2'
dest: '/etc/nsswitch.conf'
owner: 'root'
group: 'root'
mode: 0644

View file

@ -0,0 +1,23 @@
# /etc/nsswitch.conf
# {{ ansible_managed }}
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.
passwd: files systemd
group: files [SUCCESS=merge] systemd
shadow: files
gshadow: files
publickey: files
hosts: files mymachines myhostname {{ avahi__mdns_name }} [NOTFOUND=return] resolve [!UNAVAIL=return] dns
networks: nis [NOTFOUND=return] files
protocols: nis [NOTFOUND=return] db [NOTFOUND=return] files
services: nis [NOTFOUND=return] db [NOTFOUND=return] files
ethers: nis [NOTFOUND=return] db [NOTFOUND=return] files
rpc: nis [NOTFOUND=return] db [NOTFOUND=return] files
netgroup: nis [NOTFOUND=return] files

View file

@ -3,3 +3,5 @@ avahi_packages:
- avahi
- mdns-scan
- nss-mdns
avahi__mdns_name: 'mdns_minimal'

View file

@ -3,3 +3,5 @@ avahi_packages:
- 'avahi-discover'
- 'avahi-utils'
- 'mdns-scan'
avahi__mdns_name: 'mdns4_minimal'

View file

@ -1,4 +1,4 @@
---
# versionscheck
playbook_version_number: 3
playbook_version_number: 4
playbook_version_path: 'do1jlr.avahi_client.version'

View file

@ -1,3 +1,5 @@
---
avahi_packages:
- mdns-scan
avahi__mdns_name: 'mdns4_minimal'