fix bind unit file

This commit is contained in:
Sergey Bubnov (omg) 2019-06-30 14:18:23 +04:00
parent 71cdc425fd
commit d026de558d
2 changed files with 16 additions and 0 deletions

View File

@ -10,3 +10,7 @@
service: service:
name: network name: network
state: restarted state: restarted
- name: reload systemd
systemd:
daemon_reload: true

View File

@ -18,6 +18,18 @@
with_items: "{{ bind_packages }}" with_items: "{{ bind_packages }}"
tags: bind tags: bind
- name: fix bind service unit
lineinfile:
dest: /lib/systemd/system/bind.service
regexp: "{{ item.regexp | default(omit)}}"
line: "{{ item.line }}"
insertafter: "{{ item.insertafter | default(omit) }}"
notify: reload systemd
with_items:
- { line: 'PartOf=network.service', insertafter: '^After=network'}
- { regexp: '^After=network', line: 'After=network.service'}
- name: Ensure runtime directories referenced in config exist - name: Ensure runtime directories referenced in config exist
file: file:
path: "{{ item }}" path: "{{ item }}"