unbound(role): update readme and move task block to top level and remove unused
This commit is contained in:
parent
82760d2bc2
commit
7eabd88e2c
4 changed files with 68 additions and 72 deletions
|
|
@ -1,55 +1,52 @@
|
|||
- name: unbound role main
|
||||
block:
|
||||
- name: install unbound dns resolver
|
||||
become: true
|
||||
ansible.builtin.package:
|
||||
name: unbound
|
||||
|
||||
- name: install unbound dns resolver
|
||||
become: true
|
||||
ansible.builtin.package:
|
||||
name: unbound
|
||||
- name: install unbound-anchor
|
||||
become: true
|
||||
ansible.builtin.package:
|
||||
name: unbound-anchor
|
||||
|
||||
- name: install unbound-anchor
|
||||
become: true
|
||||
ansible.builtin.package:
|
||||
name: unbound-anchor
|
||||
- name: ensure correct directory permissions
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
path: /etc/unbound
|
||||
state: directory
|
||||
mode: u=rwX,g=rX,o=rX
|
||||
recurse: true
|
||||
owner: unbound
|
||||
group: unbound
|
||||
|
||||
- name: ensure correct directory permissions
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
path: /etc/unbound
|
||||
state: directory
|
||||
mode: u=rwX,g=rX,o=rX
|
||||
recurse: true
|
||||
owner: unbound
|
||||
group: unbound
|
||||
- name: configure unbound dns resolver
|
||||
become: true
|
||||
notify: unbound.restarted
|
||||
ansible.builtin.template:
|
||||
src: unbound.conf.j2
|
||||
dest: /etc/unbound/unbound.conf
|
||||
owner: unbound
|
||||
group: unbound
|
||||
mode: u=rw,g=r,o=r
|
||||
|
||||
- name: configure unbound dns resolver
|
||||
become: true
|
||||
notify: unbound.restarted
|
||||
ansible.builtin.template:
|
||||
src: unbound.conf.j2
|
||||
dest: /etc/unbound/unbound.conf
|
||||
owner: unbound
|
||||
group: unbound
|
||||
mode: u=rw,g=r,o=r
|
||||
- name: disable systemd-resolved
|
||||
when: unbound_disable_systemd_networkd
|
||||
ansible.builtin.include_role:
|
||||
name: deploy_systemd_resolved_config
|
||||
vars:
|
||||
deploy_systemd_resolved_config__enable: false
|
||||
deploy_systemd_resolved_config__dns:
|
||||
- 127.0.0.1
|
||||
|
||||
- name: disable systemd-resolved
|
||||
when: unbound_disable_systemd_networkd
|
||||
ansible.builtin.include_role:
|
||||
name: deploy_systemd_resolved_config
|
||||
vars:
|
||||
deploy_systemd_resolved_config__enable: false
|
||||
deploy_systemd_resolved_config__dns:
|
||||
- 127.0.0.1
|
||||
- name: flush handlers
|
||||
ansible.builtin.meta: flush_handlers
|
||||
|
||||
- name: flush handlers
|
||||
ansible.builtin.meta: flush_handlers
|
||||
- name: ensure unbound is running and enabled
|
||||
become: true
|
||||
ansible.builtin.systemd:
|
||||
name: unbound.service
|
||||
state: started
|
||||
enabled: true
|
||||
|
||||
- name: ensure unbound is running and enabled
|
||||
become: true
|
||||
ansible.builtin.systemd:
|
||||
name: unbound.service
|
||||
state: started
|
||||
enabled: true
|
||||
|
||||
- name: install and configure prometheus-exporter for unbound
|
||||
ansible.builtin.import_tasks: prometheus-exporter.yml
|
||||
when: unbound_install_prometheus_exporter
|
||||
- name: install and configure prometheus-exporter for unbound
|
||||
ansible.builtin.import_tasks: prometheus-exporter.yml
|
||||
when: unbound_install_prometheus_exporter
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue