mirror of
https://github.com/ansible-collections/google.cloud.git
synced 2025-10-16 13:24:10 -07:00
fix role tests
Ansible role tests were failing due to ansible-lint reporting multiple errors. Fixing those errors resolves the failing tests. Switching gcsfuse to use gcloud's bootstrap to follow the current docker install instructions. Removing centos as it's a discontinued distribution. Adding a check to ensure integration tests are skipped unless they are run by a branch (a public fork does not pass required integration test credentials).
This commit is contained in:
parent
18900797c5
commit
f692dd4c76
21 changed files with 113 additions and 96 deletions
|
@ -1,27 +1,27 @@
|
|||
---
|
||||
# tasks to install gcloud via archive
|
||||
- name: gcloud | Archive | Look for existing Google Cloud SDK installation
|
||||
stat:
|
||||
ansible.builtin.stat:
|
||||
path: "{{ gcloud_archive_path }}/google-cloud-sdk/VERSION"
|
||||
register: gcloud_status
|
||||
|
||||
- name: gcloud | Archive | Get gcloud_status
|
||||
debug: var=gcloud_status
|
||||
ansible.builtin.debug: var=gcloud_status
|
||||
|
||||
- name: gcloud | Archive | Set installed version if installation exists
|
||||
block:
|
||||
- name: gcloud | Archive | Importing contents of {{ gcloud_archive_path }}/google-cloud-sdk/VERSION
|
||||
slurp:
|
||||
- name: gcloud | Archive | Importing contents of ./google-cloud-sdk/VERSION in {{ gcloud_archive_path }}
|
||||
ansible.builtin.slurp:
|
||||
src: "{{ gcloud_archive_path }}/google-cloud-sdk/VERSION"
|
||||
register: gcloud_installed_version_data
|
||||
- name: gcloud | Archive | Setting the gcloud_installed_version variable/fact
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
gcloud_installed_version: "{{ (gcloud_installed_version_data.content|b64decode|trim) }}"
|
||||
- name: gcloud | Archive | get the gcloud_installed_version
|
||||
debug:
|
||||
ansible.builtin.debug:
|
||||
msg: "google-cloud-sdk: {{ gcloud_installed_version }} is installed"
|
||||
- name: gcloud | Archive | Version already installed
|
||||
debug:
|
||||
ansible.builtin.debug:
|
||||
msg: >-
|
||||
Skipping installation of google-cloud-sdk version {{ gcloud_version }} when
|
||||
{{ gcloud_installed_version }} is already installed.
|
||||
|
@ -29,12 +29,12 @@
|
|||
when: gcloud_status.stat.exists
|
||||
|
||||
- name: gcloud | Archive | Start installation
|
||||
include_tasks: archive_install.yml
|
||||
ansible.builtin.include_tasks: archive_install.yml
|
||||
when: gcloud_installed_version is undefined or
|
||||
gcloud_version is version(gcloud_installed_version, '>')
|
||||
|
||||
- name: gcloud | Debian | Install the google-cloud-sdk additional components # noqa 301
|
||||
command: gcloud components install {{ item }}
|
||||
ansible.builtin.command: gcloud components install {{ item }}
|
||||
register: gcloud_install_comp_status
|
||||
changed_when: "'All components are up to date.' not in gcloud_install_comp_status.stderr_lines"
|
||||
loop: "{{ gcloud_additional_components }}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue