Move ansible to it's own directory structure
This commit is contained in:
37
ansible/playbooks/configure_unbound.yml
Normal file
37
ansible/playbooks/configure_unbound.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
- name: Master playbook to install and configure unbound
|
||||
hosts: unbound_servers
|
||||
become: true
|
||||
|
||||
tasks:
|
||||
- name: Permit traffic in default zone for dns service
|
||||
ansible.posix.firewalld:
|
||||
service: dns
|
||||
permanent: true
|
||||
immediate: true
|
||||
state: enabled
|
||||
|
||||
- name: Create the directory
|
||||
ansible.builtin.file:
|
||||
path: /etc/systemd/resolved.conf.d
|
||||
state: directory
|
||||
mode: '0755'
|
||||
owner: root
|
||||
group: root
|
||||
|
||||
- name: Put `unbound.conf` in the correct place
|
||||
ansible.builtin.copy:
|
||||
src: ../roles/common/files/unbound.conf
|
||||
dest: /etc/systemd/resolved.conf.d/unbound.conf
|
||||
mode: '0644'
|
||||
owner: root
|
||||
group: root
|
||||
|
||||
- name: Restart service systemd-resolved
|
||||
ansible.builtin.service:
|
||||
name: systemd-resolved
|
||||
state: restarted
|
||||
|
||||
- name: Install unbound via role
|
||||
ansible.builtin.import_role:
|
||||
name: Anthony25.unbound
|
||||
Reference in New Issue
Block a user