From 8212e17d6ac0724d5c9c34a0d320fde882e214c6 Mon Sep 17 00:00:00 2001 From: Tobias Hachmer Date: Thu, 26 Oct 2017 22:35:55 +0200 Subject: [PATCH] Ensure systemd units are started --- roles/service-bind-slave/tasks/main.yml | 11 ++++++----- roles/service-dhcpd/tasks/main.yml | 12 ++++++------ roles/service-fastd-intragate/tasks/main.yml | 17 +++++++++-------- roles/service-fastd-mesh/tasks/main.yml | 17 +++++++++-------- roles/service-ntpd/tasks/main.yml | 1 - roles/service-radvd/tasks/main.yml | 11 ++++++----- roles/service-tinc/tasks/main.yml | 11 ++++++----- 7 files changed, 42 insertions(+), 38 deletions(-) diff --git a/roles/service-bind-slave/tasks/main.yml b/roles/service-bind-slave/tasks/main.yml index 8b025fe..d985682 100644 --- a/roles/service-bind-slave/tasks/main.yml +++ b/roles/service-bind-slave/tasks/main.yml @@ -8,11 +8,6 @@ - bind9-doc - bind9utils -- name: enable systemd unit bind9 - systemd: - name: bind9 - enabled: yes - - name: write named.conf template: src: named.conf.j2 @@ -88,3 +83,9 @@ name: icvpn-dns-update.timer enabled: yes state: started + +- name: enable systemd unit bind9 + systemd: + name: bind9 + enabled: yes + state: started diff --git a/roles/service-dhcpd/tasks/main.yml b/roles/service-dhcpd/tasks/main.yml index 28265e7..42c5194 100644 --- a/roles/service-dhcpd/tasks/main.yml +++ b/roles/service-dhcpd/tasks/main.yml @@ -4,12 +4,6 @@ name: isc-dhcp-server state: present -- name: enable systemd unit isc-dhcp-server - systemd: - name: isc-dhcp-server - enabled: yes - daemon_reload: yes - - name: concatenate meshbridge interfaces set_fact: dhcp_interfaces: "{% for mesh in meshes %}{{ mesh.id }}BR{% if not loop.last %} {% endif %}{% endfor %}" @@ -32,3 +26,9 @@ src: dhcpd.conf.j2 dest: /etc/dhcp/dhcpd.conf notify: restart isc dhcp server + +- name: enable systemd unit isc-dhcp-server + systemd: + name: isc-dhcp-server + enabled: yes + state: started diff --git a/roles/service-fastd-intragate/tasks/main.yml b/roles/service-fastd-intragate/tasks/main.yml index 7c9495f..d36a93e 100644 --- a/roles/service-fastd-intragate/tasks/main.yml +++ b/roles/service-fastd-intragate/tasks/main.yml @@ -1,12 +1,4 @@ --- -- name: configure systemd unit fastd@ - systemd: - name: "fastd@{{ item.0.id }}igVPN-{{ item.1.mtu }}" - enabled: yes - with_subelements: - - "{{ meshes }}" - - fastd.intragate.instances - - name: create fastd intragate directories file: path: "/etc/fastd/{{ item.0.id }}igVPN-{{ item.1.mtu }}" @@ -55,3 +47,12 @@ with_subelements: - "{{ meshes }}" - fastd.intragate.instances + +- name: configure systemd unit fastd@ + systemd: + name: "fastd@{{ item.0.id }}igVPN-{{ item.1.mtu }}" + enabled: yes + state: started + with_subelements: + - "{{ meshes }}" + - fastd.intragate.instances diff --git a/roles/service-fastd-mesh/tasks/main.yml b/roles/service-fastd-mesh/tasks/main.yml index 9d0ba57..237652c 100644 --- a/roles/service-fastd-mesh/tasks/main.yml +++ b/roles/service-fastd-mesh/tasks/main.yml @@ -1,12 +1,4 @@ --- -- name: configure systemd unit fastd@ - systemd: - name: "fastd@{{ item.0.id }}VPN-{{ item.1.mtu }}" - enabled: yes - with_subelements: - - "{{ meshes }}" - - fastd.nodes.instances - - name: create fastd directories file: path: "/etc/fastd/{{ item.0.id }}VPN-{{ item.1.mtu }}" @@ -146,3 +138,12 @@ with_items: - fastd-sync-meshkeys - fastd-peer-limit-update + +- name: configure systemd unit fastd@ + systemd: + name: "fastd@{{ item.0.id }}VPN-{{ item.1.mtu }}" + enabled: yes + state: started + with_subelements: + - "{{ meshes }}" + - fastd.nodes.instances diff --git a/roles/service-ntpd/tasks/main.yml b/roles/service-ntpd/tasks/main.yml index 28db3f4..e2e6cde 100644 --- a/roles/service-ntpd/tasks/main.yml +++ b/roles/service-ntpd/tasks/main.yml @@ -20,4 +20,3 @@ name: ntp enabled: yes state: started - daemon_reload: yes diff --git a/roles/service-radvd/tasks/main.yml b/roles/service-radvd/tasks/main.yml index 6311819..feeb46d 100644 --- a/roles/service-radvd/tasks/main.yml +++ b/roles/service-radvd/tasks/main.yml @@ -4,13 +4,14 @@ name: radvd state: present -- name: enable systemd unit radvd - systemd: - name: radvd - enabled: yes - - name: configure radvd template: src: radvd.conf.j2 dest: /etc/radvd.conf notify: restart systemd unit radvd + +- name: enable systemd unit radvd + systemd: + name: radvd + enabled: yes + state: started diff --git a/roles/service-tinc/tasks/main.yml b/roles/service-tinc/tasks/main.yml index ad57773..034350f 100644 --- a/roles/service-tinc/tasks/main.yml +++ b/roles/service-tinc/tasks/main.yml @@ -6,11 +6,6 @@ with_items: - tinc -- name: configure systemd unit tinc - systemd: - name: tinc - enabled: yes - - name: clone icvpn repo git: repo: "{{ icvpn.icvpn_repo }}" @@ -75,3 +70,9 @@ owner: root group: root notify: restart systemd unit tinc + +- name: configure systemd unit tinc + systemd: + name: tinc + enabled: yes + state: started