fix(ansible-lint): missing name, wrong permission, truth, and use fqdn
This commit is contained in:
parent
4aaaf2fa4f
commit
4235e237e2
@ -1,55 +1,63 @@
|
||||
---
|
||||
- block:
|
||||
- name: "Update goteleport block"
|
||||
when: (not teleport_version_check|bool) or (teleport_active_version.stdout != teleport_version)
|
||||
block:
|
||||
- name: Download teleport archive
|
||||
get_url:
|
||||
ansible.builtin.get_url:
|
||||
url: "{{ teleport_dl_url }}.tar.gz"
|
||||
dest: "/tmp/teleport-{{ teleport_version }}-linux-{{ teleport_arch }}.tar.gz"
|
||||
checksum: "sha256:{{ teleport_sha256_url }}.tar.gz.sha256"
|
||||
mode: "0755"
|
||||
register: _download_archive
|
||||
until: _download_archive is succeeded
|
||||
retries: 5
|
||||
delay: 2
|
||||
|
||||
- name: create directory if they don't exist
|
||||
file:
|
||||
- name: Create directory if they don't exist
|
||||
ansible.builtin.file:
|
||||
path: "/tmp/teleport-{{ teleport_version }}"
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0775
|
||||
owner: "root"
|
||||
group: "root"
|
||||
mode: "0775"
|
||||
|
||||
- name: Unpack Teleport Package
|
||||
unarchive:
|
||||
remote_src: yes
|
||||
ansible.builtin.unarchive:
|
||||
remote_src: true
|
||||
src: "/tmp/teleport-{{ teleport_version }}-linux-{{ teleport_arch }}.tar.gz"
|
||||
dest: "/tmp/teleport-{{ teleport_version }}"
|
||||
mode: 0755
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0755"
|
||||
owner: "root"
|
||||
group: "root"
|
||||
|
||||
- name: create directory if they don't exist
|
||||
file:
|
||||
- name: Create directory if they don't exist
|
||||
ansible.builtin.file:
|
||||
path: "/var/lib/teleport"
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0775
|
||||
owner: "root"
|
||||
group: "root"
|
||||
mode: "0775"
|
||||
|
||||
- name: copy all binaries
|
||||
copy:
|
||||
- name: Copy all binaries
|
||||
ansible.builtin.copy:
|
||||
remote_src: true
|
||||
src: "/tmp/teleport-{{ teleport_version }}/teleport/{{ item }}"
|
||||
dest: "/usr/local/bin/{{ item }}"
|
||||
owner: "root"
|
||||
group: "root"
|
||||
mode: "0755"
|
||||
loop:
|
||||
- "tbot"
|
||||
- "tctl"
|
||||
- "tsh"
|
||||
- "teleport"
|
||||
|
||||
- name: copy teleport binary
|
||||
copy:
|
||||
- name: Copy teleport binary
|
||||
ansible.builtin.copy:
|
||||
remote_src: true
|
||||
src: "/tmp/teleport-{{ teleport_version }}/teleport/teleport"
|
||||
dest: "/usr/local/bin/teleport"
|
||||
owner: "root"
|
||||
group: "root"
|
||||
mode: "0755"
|
||||
notify: "Restart Teleport"
|
||||
when: (not teleport_version_check|bool) or (teleport_active_version.stdout != teleport_version)
|
||||
|
Loading…
Reference in New Issue
Block a user