2023-02-16 14:15:37 +00:00
|
|
|
---
|
2023-04-27 10:57:30 +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
|
2023-06-25 13:37:22 +00:00
|
|
|
async: 15
|
|
|
|
poll: 0
|
2023-02-16 14:15:37 +00:00
|
|
|
when: ansible_service_mgr == "systemd"
|
2023-06-25 13:37:22 +00:00
|
|
|
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"
|