2023-02-16 14:15:37 +00:00
|
|
|
---
|
|
|
|
- name: "Check Teleport version"
|
|
|
|
ansible.builtin.shell: "set -eo pipefail; teleport version | cut -d' ' -f 2 | cut -d'v' -f 2"
|
|
|
|
args:
|
|
|
|
executable: /bin/bash
|
|
|
|
register: teleport_active_version
|
|
|
|
changed_when: false
|
|
|
|
failed_when: false
|
|
|
|
when: teleport_version_check|bool
|
|
|
|
|
2023-06-25 13:36:44 +00:00
|
|
|
- name: "Check if teleport pid file exist"
|
|
|
|
ansible.builtin.stat:
|
|
|
|
path: "{{ pid_file_telport }}"
|
|
|
|
register: pid_file_telport_state
|
|
|
|
|
|
|
|
- name: "Get Main PID of Teleport"
|
|
|
|
when: pid_file_teleport_state.stat.isdir is defined and not pid_file_teleport_state.stat.isdir
|
|
|
|
ansible.builtin.shell: "cat /run/teleport.pid"
|
|
|
|
args:
|
|
|
|
executable: /bin/bash
|
|
|
|
register: teleport_main_pid
|
|
|
|
changed_when: false
|
|
|
|
failed_when: false
|
|
|
|
|
|
|
|
|
2023-04-25 14:06:49 +00:00
|
|
|
- name: "Update goteleport"
|
|
|
|
ansible.builtin.include_tasks: "install.yml"
|