Bind: variable for systemd service file

This commit is contained in:
Jérémy Lecour 2017-04-06 11:15:28 +02:00 committed by Jérémy Lecour
parent 6827be7f60
commit cb28ddd406
2 changed files with 5 additions and 5 deletions

View file

@ -1 +1,2 @@
--- ---
bind_systemd_service_path: /etc/systemd/system/bind9.service

View file

@ -9,19 +9,18 @@
regexp: '^OPTIONS.*' regexp: '^OPTIONS.*'
replace: 'OPTIONS="-u bind -t /var/chroot-bind"' replace: 'OPTIONS="-u bind -t /var/chroot-bind"'
- name: Create /etc/systemd/system/bind9.service - name: Create systemd service
file: file:
path: "/etc/systemd/system/bind9.service" path: "{{ bind_systemd_service_path }}"
state: file
owner: root owner: root
group: root group: root
mode: 0644 mode: 0644
state: touch state: touch
register: create_bind_systemd register: create_bind_systemd
- name: Fill out /etc/systemd/system/bind9.service - name: "Fill out systemd service"
blockinfile: blockinfile:
dest: /etc/systemd/system/bind9.service dest: "{{ bind_systemd_service_path }}"
block: | block: |
[Unit] [Unit]
Description=BIND Domain Name Server Description=BIND Domain Name Server