-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathteleport.yml
43 lines (37 loc) · 1.31 KB
/
teleport.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
- hosts: all,!152.67.103.175
become: true
become_method: sudo
tasks:
- name: See if teleport.yaml exists
register: teleport_required_file
stat:
path: /etc/teleport.yaml
- name: check packages
package_facts:
manager: auto
when:
- teleport_required_file.stat.exists
- name: Download latest teleport x64 version
apt:
deb: "{{ teleport_package_x64_url }}"
when: (teleport_required_file.stat.exists) and
(ansible_facts.packages['teleport'][0]['version'] < teleport_version) and
(ansible_architecture == "x86_64")
- name: Download latest teleport arm64 version
apt:
deb: "{{ teleport_package_arm64_url }}"
when: (teleport_required_file.stat.exists) and
(ansible_facts.packages['teleport'][0]['version'] < teleport_version) and
(ansible_architecture == "aarch64")
- name: Download latest teleport arm version
apt:
deb: "{{ teleport_package_arm_url }}"
when: (teleport_required_file.stat.exists) and
(ansible_facts.packages['teleport'][0]['version'] < teleport_version) and
(ansible_architecture == "armv7l")
- name: Restart Teleport Service
ansible.builtin.systemd:
state: restarted
name: teleport
when:
- teleport_required_file.stat.exists