Enable services

Not just during reload
This commit is contained in:
Jake Howard 2020-04-28 20:48:15 +01:00
parent 61136f69af
commit 974e0e8467
Signed by: jake
GPG key ID: 57AFB45680EDD477
3 changed files with 19 additions and 2 deletions

View file

@ -12,6 +12,12 @@
become: true
register: haproxy_config
- name: Enable Haproxy
service:
name: haproxy
enabled: true
become: true
- name: Restart Haproxy
service:
name: haproxy

View file

@ -9,8 +9,13 @@
- name: Enable wireguard
service:
name: wg-quick@wg0
state: restarted
enabled: true
become: true
- name: Restart wireguard
service:
name: wg-quick@wg0
state: restarted
when: wireguard_conf.changed
become: true

View file

@ -24,7 +24,13 @@
become: true
register: sshd_config
- name: Restart SSH config
- name: Enable SSH
service:
name: sshd
enabled: true
become: true
- name: Restart SSH Daemon
service:
name: sshd
state: reloaded