ansible-role-server/handlers/main.yml

33 lines
548 B
YAML

---
# handlers file for server
- name: Update Apt Cache
become: true
ansible.builtin.apt:
update_cache: true
- name: Restart sshd
become: true
ansible.builtin.service:
name: ssh
state: restarted
- name: Enable caddy
become: true
ansible.builtin.service:
name: caddy
enabled: true
- name: Restart caddy
become: true
ansible.builtin.service:
name: caddy
state: restarted
- name: Enable and restart caddy
become: true
ansible.builtin.service:
name: caddy
state: restarted
enabled: true