Ensure systemd units are started

This commit is contained in:
Tobias Hachmer 2017-10-26 22:35:55 +02:00
parent a2110b33ee
commit 8212e17d6a
7 changed files with 42 additions and 38 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -20,4 +20,3 @@
name: ntp
enabled: yes
state: started
daemon_reload: yes

View file

@ -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

View file

@ -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