role-goteleport/handlers/main.yml

25 lines
537 B
YAML
Raw Normal View History

2023-02-16 14:15:37 +00:00
---
- name: "Reload systemd"
ansible.builtin.systemd:
daemon_reload: true
when: ansible_service_mgr == "systemd"
2023-02-16 14:15:37 +00:00
- name: "Restart Teleport"
ansible.builtin.service:
name: teleport
state: restarted
async: 15
poll: 0
2023-02-16 14:15:37 +00:00
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"