role-goteleport/handlers/main.yml
2023-06-25 13:37:22 +00:00

25 lines
537 B
YAML

---
- name: "Reload systemd"
ansible.builtin.systemd:
daemon_reload: true
when: ansible_service_mgr == "systemd"
- name: "Restart Teleport"
ansible.builtin.service:
name: teleport
state: restarted
async: 15
poll: 0
when: ansible_service_mgr == "systemd"
notify: "Check Teleport restart"
- name: "Check Teleport restart"
delegate_to: localhost
ansible.builtin.wait_for:
host: "{{ inventory_hostname }}"
port: "3022"
delay: 10
timeout: 30
state: started
msg: "Telport has restarted"