diff --git a/bind/defaults/main.yml b/bind/defaults/main.yml index ed97d539..9a8984ea 100644 --- a/bind/defaults/main.yml +++ b/bind/defaults/main.yml @@ -1 +1,2 @@ --- +bind_systemd_service_path: /etc/systemd/system/bind9.service diff --git a/bind/tasks/main.yml b/bind/tasks/main.yml index 56ada99f..75285f97 100644 --- a/bind/tasks/main.yml +++ b/bind/tasks/main.yml @@ -9,19 +9,18 @@ regexp: '^OPTIONS.*' replace: 'OPTIONS="-u bind -t /var/chroot-bind"' -- name: Create /etc/systemd/system/bind9.service +- name: Create systemd service file: - path: "/etc/systemd/system/bind9.service" - state: file + path: "{{ bind_systemd_service_path }}" owner: root group: root mode: 0644 state: touch register: create_bind_systemd -- name: Fill out /etc/systemd/system/bind9.service +- name: "Fill out systemd service" blockinfile: - dest: /etc/systemd/system/bind9.service + dest: "{{ bind_systemd_service_path }}" block: | [Unit] Description=BIND Domain Name Server