mirror of
https://github.com/ansible-collections/google.cloud.git
synced 2025-08-24 15:01:50 -07:00
ansible-lint was updated and the GitHub action did not pin the dependency, resulting in the repository to fail sanity tests. Updating the repository to adhere to new fatal linter rules, but also pinning the linter to prevent failures that may be unrelated to the particular commit. Updating usages for python3.8 to 3.9 as ansible-lint is dropping support for 3.8.
54 lines
1.8 KiB
YAML
54 lines
1.8 KiB
YAML
---
|
|
- name: Gcloud | Archive | Ensure temp path exists
|
|
ansible.builtin.file:
|
|
path: "{{ gcloud_archive_path }}"
|
|
state: "directory"
|
|
mode: "0755"
|
|
|
|
- name: Gcloud | Archive | Extract Cloud SDK archive
|
|
ansible.builtin.unarchive:
|
|
src: "{{ gcloud_archive_url }}"
|
|
dest: "{{ gcloud_archive_path }}"
|
|
remote_src: yes
|
|
creates: "{{ gcloud_library_path }}"
|
|
|
|
- name: Gcloud | Archive | Link binaries to /usr/bin (like package install)
|
|
ansible.builtin.file:
|
|
src: "{{ gcloud_library_path }}/bin/{{ item }}"
|
|
dest: "/usr/bin/{{ item }}"
|
|
state: link
|
|
loop:
|
|
- bq
|
|
- docker-credential-gcloud
|
|
- gcloud
|
|
- git-credential-gcloud.sh
|
|
- gsutil
|
|
when: not gcloud_install_script
|
|
|
|
- name: Gcloud | Archive | Add command completion
|
|
ansible.builtin.include_tasks: command_completion.yml
|
|
when: gcloud_command_completion
|
|
|
|
- name: Gcloud | Archive | Install into Path
|
|
changed_when: false
|
|
ansible.builtin.command: >-
|
|
{{ gcloud_archive_path }}/install.sh --quiet
|
|
--usage-reporting {{ gcloud_usage_reporting | lower }}
|
|
{% if gcloud_profile_path %}
|
|
--rc-path {{ gcloud_profile_path }}
|
|
{% endif %}
|
|
--command-completion {{ gcloud_command_completion | lower }}
|
|
--path-update {{ gcloud_update_path | lower }}
|
|
{% if gcloud_override_components | length > 0 %}--override-components
|
|
{% for component in gcloud_override_components %}{{ component }}
|
|
{% if loop.index < gcloud_override_components | length %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% if gcloud_additional_components | length > 0 %}--additional-components
|
|
{% for component in gcloud_additional_components %}{{ component }}
|
|
{% if loop.index < gcloud_additional_components | length %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
when: gcloud_install_script
|