Add ansible roles + templates
This commit is contained in:
35
ansible/roles/dns-internal/tasks/main.yml
Normal file
35
ansible/roles/dns-internal/tasks/main.yml
Normal file
@ -0,0 +1,35 @@
|
||||
---
|
||||
|
||||
- name: Install packages for local resolver
|
||||
tags: resolver-install
|
||||
ansible.builtin.package:
|
||||
name:
|
||||
- nsd
|
||||
- git
|
||||
state: latest
|
||||
|
||||
- name: NSD - Enable service
|
||||
tags: nsd-enable
|
||||
ansible.builtin.service:
|
||||
name: 'nsd'
|
||||
state: started
|
||||
enabled: yes
|
||||
|
||||
- name: NSD - Define configuration
|
||||
tags: nsd-configure
|
||||
ansible.builtin.template:
|
||||
src: nsd.conf
|
||||
dest: /etc/nsd/nsd.conf
|
||||
validate: /usr/sbin/nsd-checkconf %s
|
||||
backup: yes
|
||||
notify: restart nsd
|
||||
|
||||
- name: Auto-update the git repo for the internal zone
|
||||
tags: nsd-dns-gitupdate
|
||||
ansible.builtin.git:
|
||||
repo: https://git.labolyon.fr/LOL-si/dns-lolinternal.git
|
||||
dest: /srv/nsd/
|
||||
version: main
|
||||
update: yes
|
||||
notify:
|
||||
- restart nsd
|
Reference in New Issue
Block a user