forked from ccchb/ansible
Use path variables for NSD. Changes #31
This commit is contained in:
parent
493a459466
commit
8f23dd83b0
2 changed files with 8 additions and 8 deletions
|
@ -5,10 +5,10 @@
|
||||||
state: reloaded
|
state: reloaded
|
||||||
|
|
||||||
- name: Reload nsd
|
- name: Reload nsd
|
||||||
command: s6-svc -h /run/service/nsd
|
command: s6-svc -h {{ s6_scan_dir }}/nsd
|
||||||
|
|
||||||
- name: Restart nsd
|
- name: Restart nsd
|
||||||
command: s6-svc -wR -T 5000 -ru /run/service/nsd
|
command: s6-svc -wR -T 5000 -ru {{ s6_scan_dir }}/nsd
|
||||||
|
|
||||||
- name: Restart nsd log
|
- name: Restart nsd log
|
||||||
command: s6-svc -wR -T 5000 -ru /run/service/nsd-log
|
command: s6-svc -wR -T 5000 -ru {{ s6_scan_dir }}/nsd-log
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
- name: Create nsd service directories
|
- name: Create nsd service directories
|
||||||
file:
|
file:
|
||||||
path: '/etc/s6-rc/service/{{ item }}'
|
path: '{{ s6_etc_dir }}/service/{{ item }}'
|
||||||
state: directory
|
state: directory
|
||||||
owner: root
|
owner: root
|
||||||
group: wheel
|
group: wheel
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
- name: Generate nsd service scripts
|
- name: Generate nsd service scripts
|
||||||
template:
|
template:
|
||||||
dest: '/etc/s6-rc/service/{{ item }}'
|
dest: '{{ s6_etc_dir }}/service/{{ item }}'
|
||||||
src: '{{ item }}.j2'
|
src: '{{ item }}.j2'
|
||||||
mode: 0555
|
mode: 0555
|
||||||
owner: root
|
owner: root
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
|
|
||||||
- name: Generate nsd service configuration
|
- name: Generate nsd service configuration
|
||||||
copy:
|
copy:
|
||||||
dest: '/etc/s6-rc/service/{{ item.name }}'
|
dest: '{{ s6_etc_dir }}/service/{{ item.name }}'
|
||||||
content: '{{ item.content }}'
|
content: '{{ item.content }}'
|
||||||
mode: 0444
|
mode: 0444
|
||||||
owner: root
|
owner: root
|
||||||
|
@ -67,13 +67,13 @@
|
||||||
meta: flush_handlers
|
meta: flush_handlers
|
||||||
|
|
||||||
- name: Start nsd
|
- name: Start nsd
|
||||||
command: fdmove -c 2 1 s6-rc -u -v 2 -t 15000 change nsd
|
command: fdmove -c 2 1 s6-rc -l {{ s6_live_dir }} -u -v 2 -t 15000 change nsd
|
||||||
register: change
|
register: change
|
||||||
changed_when: change.stdout | length > 0
|
changed_when: change.stdout | length > 0
|
||||||
|
|
||||||
- name: Enable nsd
|
- name: Enable nsd
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/s6-rc/service/enabled/contents
|
path: '{{ s6_etc_dir }}/service/enabled/contents'
|
||||||
regexp: "^nsd$"
|
regexp: "^nsd$"
|
||||||
line: nsd
|
line: nsd
|
||||||
state: present
|
state: present
|
||||||
|
|
Loading…
Reference in a new issue