add become
This commit is contained in:
parent
070a12cb39
commit
507bb16188
3 changed files with 9 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
[primary]
|
||||
163.172.129.205 ansible_user=root
|
||||
dev-ns1.vm ansible_user=roger
|
||||
|
||||
[secondary]
|
||||
51.158.108.60 ansible_user=root
|
||||
dev-ns2.vm ansible_user=roger
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
---
|
||||
- name: reload knot
|
||||
become: yes
|
||||
command:
|
||||
cmd: knotc reload
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
---
|
||||
- name: Install knot
|
||||
become: yes
|
||||
apt:
|
||||
update_cache: yes
|
||||
pkg:
|
||||
- knot
|
||||
- knot-dnsutils
|
||||
|
||||
- name: Update zones
|
||||
become: yes
|
||||
ansible.builtin.copy:
|
||||
src: '{{ zones_dir }}/'
|
||||
dest: /var/lib/knot/zones
|
||||
|
@ -15,13 +18,15 @@
|
|||
notify: reload knot
|
||||
when: "inventory_hostname in groups.primary"
|
||||
|
||||
- name:
|
||||
- name: Deploy conf
|
||||
become: yes
|
||||
template:
|
||||
src: knot.conf.j2
|
||||
dest: /etc/knot/knot.conf
|
||||
notify: reload knot
|
||||
|
||||
- name: Start knot
|
||||
become: yes
|
||||
service:
|
||||
name: knot
|
||||
state: started
|
||||
|
|
Loading…
Reference in a new issue