Skip to content

Commit

Permalink
Install AWS CLI with --update flag
Browse files Browse the repository at this point in the history
When using an AMI with aws CLI already the process fails due to this error:
```
amazon-ebs.ubuntu-22.04: fatal: [default]: FAILED! => {"changed": true, "cmd": ["/tmp/aws/install", "-i", "/usr/local/aws-cli", "-b", "/usr/local/sbin"], "delta": "0:00:01.067315", "end": "2024-08-26 23:55:10.251337", "msg": "non-zero return code", "rc": 1, "start": "2024-08-26 23:55:09.184022", "stderr": "Found preexisting AWS CLI installation: /usr/local/aws-cli/v2/current. Please rerun install script with --update flag.", "stderr_lines": ["Found preexisting AWS CLI installation: /usr/local/aws-cli/v2/current. Please rerun install script with --update flag."], "stdout": "", "stdout_lines": []}
```
I propose to install the aws cli with the --upgrade option in order to overcome these situations
  • Loading branch information
ohayak authored Aug 27, 2024
1 parent d86abac commit 2e837a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion images/capi/ansible/roles/providers/tasks/awscliv2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
when: ansible_os_family != "Flatcar"

- name: Install AWS CLI v2
ansible.builtin.command: /tmp/aws/install -i /usr/local/aws-cli -b /usr/local/sbin
ansible.builtin.command: /tmp/aws/install --update -i /usr/local/aws-cli -b /usr/local/sbin
when: ansible_os_family != "Flatcar"

- name: Remove temporary files
Expand Down

0 comments on commit 2e837a7

Please sign in to comment.