From 1c83ad5a3bc58da5690ac731902580a073d38429 Mon Sep 17 00:00:00 2001 From: Moshe Atlow Date: Wed, 27 Sep 2023 03:07:22 +0300 Subject: [PATCH] ansible: install aws cli on release builders --- ansible/playbooks/jenkins/worker/create.yml | 1 + ansible/roles/release-builder/tasks/main.yml | 22 ++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/ansible/playbooks/jenkins/worker/create.yml b/ansible/playbooks/jenkins/worker/create.yml index 8d4f862d9..41e41df37 100644 --- a/ansible/playbooks/jenkins/worker/create.yml +++ b/ansible/playbooks/jenkins/worker/create.yml @@ -8,6 +8,7 @@ - test - release - "!*-win*" + gather_facts: yes roles: - bootstrap diff --git a/ansible/roles/release-builder/tasks/main.yml b/ansible/roles/release-builder/tasks/main.yml index eb30318c0..28a0e561f 100644 --- a/ansible/roles/release-builder/tasks/main.yml +++ b/ansible/roles/release-builder/tasks/main.yml @@ -36,3 +36,25 @@ state: present become: yes become_user: "{{ server_user }}" + +# https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html +- name: Download awscliv2 installer + unarchive: + src: "https://awscli.amazonaws.com/awscli-exe-linux-{{ ansible_architecture }}.zip" + dest: "/tmp" + remote_src: true + creates: '/tmp/aws' + mode: 0755 + +- name: Run awscliv2 installer + command: + args: + cmd: "/tmp/aws/install" + creates: /usr/local/bin/aws + become: true + register: aws_install + +- name: "Show awscliv2 installer output" + debug: + var: aws_install + verbosity: 2