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:
parent
c699212b6d
commit
a685712bc1
8 changed files with 46 additions and 1 deletions
|
@ -1,3 +1,6 @@
|
||||||
---
|
---
|
||||||
|
# deploy custom /etc/nsswitch.conf config
|
||||||
|
avahi__configure_nsswitch: true
|
||||||
|
|
||||||
# should we do a version check? (recomended)
|
# should we do a version check? (recomended)
|
||||||
submodules_versioncheck: false
|
submodules_versioncheck: false
|
||||||
|
|
|
@ -11,3 +11,7 @@
|
||||||
|
|
||||||
- name: install mdns requirements
|
- name: install mdns requirements
|
||||||
ansible.builtin.include_tasks: install.yml
|
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
9
tasks/nsswitch.yml
Normal 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
|
23
templates/nsswitch.conf.j2
Normal file
23
templates/nsswitch.conf.j2
Normal 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
|
|
@ -3,3 +3,5 @@ avahi_packages:
|
||||||
- avahi
|
- avahi
|
||||||
- mdns-scan
|
- mdns-scan
|
||||||
- nss-mdns
|
- nss-mdns
|
||||||
|
|
||||||
|
avahi__mdns_name: 'mdns_minimal'
|
||||||
|
|
|
@ -3,3 +3,5 @@ avahi_packages:
|
||||||
- 'avahi-discover'
|
- 'avahi-discover'
|
||||||
- 'avahi-utils'
|
- 'avahi-utils'
|
||||||
- 'mdns-scan'
|
- 'mdns-scan'
|
||||||
|
|
||||||
|
avahi__mdns_name: 'mdns4_minimal'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
---
|
---
|
||||||
# versionscheck
|
# versionscheck
|
||||||
playbook_version_number: 3
|
playbook_version_number: 4
|
||||||
playbook_version_path: 'do1jlr.avahi_client.version'
|
playbook_version_path: 'do1jlr.avahi_client.version'
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
---
|
---
|
||||||
avahi_packages:
|
avahi_packages:
|
||||||
- mdns-scan
|
- mdns-scan
|
||||||
|
|
||||||
|
avahi__mdns_name: 'mdns4_minimal'
|
||||||
|
|
Loading…
Reference in a new issue