-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b939a5e
commit a72cc83
Showing
3 changed files
with
45 additions
and
43 deletions.
There are no files selected for viewing
68 changes: 34 additions & 34 deletions
68
automation-roles/99-generic/aws/aws-download-cli/tasks/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,41 @@ | ||
--- | ||
- name: Validate mandatory variables are defined | ||
assert: | ||
that: | ||
- cloud_platform is defined | ||
- name: Validate mandatory variables are defined | ||
assert: | ||
that: | ||
- cloud_platform is defined | ||
|
||
- name: Validate cloud_platform is implemented | ||
fail: msg="cloud_platform {{ cloud_platform }} is not implemented, current implemented cloud platforms are {{ implemented_cloud_platform_types }} " | ||
when: "cloud_platform not in implemented_cloud_platform_types" | ||
- name: Validate cloud_platform is implemented | ||
fail: msg="cloud_platform {{ cloud_platform }} is not implemented, current implemented cloud platforms are {{ implemented_cloud_platform_types }} " | ||
when: "cloud_platform not in implemented_cloud_platform_types" | ||
|
||
- name: Create downloads directory | ||
file: | ||
path: "{{ status_dir }}/downloads" | ||
state: directory | ||
- name: Create downloads directory | ||
file: | ||
path: "{{ status_dir }}/downloads" | ||
state: directory | ||
|
||
- name: Check if AWS client was already downloaded | ||
stat: | ||
path: "{{ status_dir }}/downloads/{{ _aws_cli_package }}" | ||
register: _aws_cli_download | ||
- name: Check if AWS client was already downloaded | ||
stat: | ||
path: "{{ status_dir }}/downloads/{{ _aws_cli_package }}" | ||
register: _aws_cli_download | ||
|
||
- name: Download AWS CLI "{{ _aws_cli_url }}" | ||
get_url: | ||
url: "{{ _aws_cli_url }}" | ||
dest: "{{ status_dir }}/downloads/{{ _aws_cli_package }}" | ||
owner: root | ||
mode: 0644 | ||
register: _download_result | ||
until: _download_result is succeeded | ||
retries: 5 | ||
delay: 30 | ||
when: not _aws_cli_download.stat.exists | ||
- name: Download AWS CLI "{{ _aws_cli_url }}" | ||
get_url: | ||
url: "{{ _aws_cli_url }}" | ||
dest: "{{ status_dir }}/downloads/{{ _aws_cli_package }}" | ||
owner: root | ||
mode: 0644 | ||
register: _download_result | ||
until: _download_result is succeeded | ||
retries: 5 | ||
delay: 30 | ||
when: not _aws_cli_download.stat.exists | ||
|
||
- name: Unpack aws-cli client installer | ||
unarchive: | ||
src: "{{ status_dir }}/downloads/{{ _aws_cli_package }}" | ||
dest: "{{ status_dir }}/downloads" | ||
remote_src: True | ||
- name: Unpack aws-cli client installer | ||
unarchive: | ||
src: "{{ status_dir }}/downloads/{{ _aws_cli_package }}" | ||
dest: "{{ status_dir }}/downloads" | ||
remote_src: True | ||
|
||
- name: Install aws client | ||
shell: | | ||
{{ status_dir }}/downloads/aws/install | ||
- name: Install aws client | ||
shell: | | ||
{{ status_dir }}/downloads/aws/install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters