ansible-role-server/handlers/main.yml

28 lines
455 B
YAML

---
# handlers file for server
- name: Restart sshd
become: yes
ansible.builtin.service:
name: ssh
state: restarted
- name: Enable caddy
become: yes
ansible.builtin.service:
name: caddy
enabled: yes
- name: Restart caddy
become: yes
ansible.builtin.service:
name: caddy
state: restarted
- name: Enable and restart caddy
become: yes
ansible.builtin.service:
name: caddy
state: restarted
enabled: yes