Enable services
Not just during reload
This commit is contained in:
parent
61136f69af
commit
974e0e8467
3 changed files with 19 additions and 2 deletions
|
@ -12,6 +12,12 @@
|
||||||
become: true
|
become: true
|
||||||
register: haproxy_config
|
register: haproxy_config
|
||||||
|
|
||||||
|
- name: Enable Haproxy
|
||||||
|
service:
|
||||||
|
name: haproxy
|
||||||
|
enabled: true
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: Restart Haproxy
|
- name: Restart Haproxy
|
||||||
service:
|
service:
|
||||||
name: haproxy
|
name: haproxy
|
||||||
|
|
|
@ -9,8 +9,13 @@
|
||||||
- name: Enable wireguard
|
- name: Enable wireguard
|
||||||
service:
|
service:
|
||||||
name: wg-quick@wg0
|
name: wg-quick@wg0
|
||||||
state: restarted
|
|
||||||
enabled: true
|
enabled: true
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Restart wireguard
|
||||||
|
service:
|
||||||
|
name: wg-quick@wg0
|
||||||
|
state: restarted
|
||||||
when: wireguard_conf.changed
|
when: wireguard_conf.changed
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,13 @@
|
||||||
become: true
|
become: true
|
||||||
register: sshd_config
|
register: sshd_config
|
||||||
|
|
||||||
- name: Restart SSH config
|
- name: Enable SSH
|
||||||
|
service:
|
||||||
|
name: sshd
|
||||||
|
enabled: true
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Restart SSH Daemon
|
||||||
service:
|
service:
|
||||||
name: sshd
|
name: sshd
|
||||||
state: reloaded
|
state: reloaded
|
||||||
|
|
Loading…
Reference in a new issue