-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathtasks_awscli_v2.yml
More file actions
37 lines (30 loc) · 1.01 KB
/
Copy pathtasks_awscli_v2.yml
File metadata and controls
37 lines (30 loc) · 1.01 KB
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
- name: Download AWS CLI v2
ansible.builtin.get_url:
url: "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip"
dest: "/tmp/awscliv2.zip"
- name: Unzip AWS CLI v2
ansible.builtin.unarchive:
src: "/tmp/awscliv2.zip"
dest: "/tmp"
remote_src: yes
- name: Install AWS CLI v2
ansible.builtin.command:
cmd: "./aws/install --bin-dir /usr/local/bin --install-dir /usr/local/aws-cli --update"
chdir: "/tmp"
become: true
- name: Clean up AWS CLI installer files
ansible.builtin.file:
path: "/tmp/awscliv2.zip"
state: absent
- name: Clean up AWS CLI extracted files
ansible.builtin.file:
path: "/tmp/aws"
state: absent
- name: Clean up AWS CLI extracted files
ansible.builtin.get_url:
url: "https://s3.amazonaws.com/session-manager-downloads/plugin/latest/ubuntu_64bit/session-manager-plugin.deb"
dest: "/tmp/session-manager-plugin.deb"
- name: Install Session Manager Plugin
ansible.builtin.dpkg:
name: "/tmp/session-manager-plugin.deb"
state: present