fix: upgrade ansible version, address test and lint errors

This commit is contained in:
Chris Hawk 2023-11-17 16:39:42 -08:00
commit 08ada5354d
216 changed files with 4394 additions and 4262 deletions

View file

@ -2,20 +2,20 @@
- name: Gcloud | Archive | Ensure temp path exists
ansible.builtin.file:
path: "{{ gcloud_archive_path }}"
state: "directory"
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
remote_src: true
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 }}"
dest: /usr/bin/{{ item }}
state: link
loop:
- bq

View file

@ -2,7 +2,7 @@
# task file to configure bash completion for gcloud
- name: Gcloud | Archive | Debian | Ensure bash completion is installed
ansible.builtin.apt:
name: "bash-completion"
name: bash-completion
register: task_result
until: task_result is success
retries: 10
@ -25,7 +25,7 @@
owner: root
group: root
state: directory
mode: 0755
mode: "0755"
- name: Gcloud | Archive | Link binaries to /usr/bin (like package install)
ansible.builtin.file:

View file

@ -7,7 +7,7 @@
- name: Gcloud | Archive | Get gcloud_status
ansible.builtin.debug:
var: "gcloud_status"
var: gcloud_status
- name: Gcloud | Archive | Set installed version if installation exists
when: gcloud_status.stat.exists
@ -30,11 +30,10 @@
{{ gcloud_installed_version }} is already installed.
- name: Gcloud | Archive | Start installation
when: gcloud_installed_version is undefined or
gcloud_version is version(gcloud_installed_version, '>')
when: gcloud_installed_version is undefined or gcloud_version is version(gcloud_installed_version, '>')
ansible.builtin.include_tasks: archive_install.yml
- name: Gcloud | Debian | Install the google-cloud-sdk additional components # noqa 301
- name: Gcloud | Debian | Install the google-cloud-sdk additional components # noqa no-changed-when
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"

View file

@ -1,15 +1,14 @@
---
- name: Gcloud | Load Distro and OS specific variables
ansible.builtin.include_vars: "{{ lookup('first_found', params) }}"
vars:
params:
files:
- "os/{{ ansible_distribution | lower }}.yml"
- "os/{{ ansible_os_family | lower }}.yml"
- os/{{ ansible_distribution | lower }}.yml
- os/{{ ansible_os_family | lower }}.yml
- main.yml
paths:
- 'vars'
- vars
- name: Gcloud | Install the google-cloud-sdk from {{ gcloud_install_type }}
ansible.builtin.include_tasks: "{{ gcloud_install_type }}/main.yml"

View file

@ -7,13 +7,13 @@
- name: Gcloud | Debian | Add the gcloud repository
ansible.builtin.apt_repository:
repo: "deb {{ gcloud_apt_url }} {{ gcloud_apt_repo }} main"
repo: deb {{ gcloud_apt_url }} {{ gcloud_apt_repo }} main
state: present
filename: google-cloud-sdk
- name: Gcloud | Debian | Install the google-cloud-sdk package
ansible.builtin.apt:
name: "google-cloud-sdk"
name: google-cloud-sdk
update_cache: "yes"
register: task_result
until: task_result is success
@ -22,7 +22,7 @@
- name: Gcloud | Debian | Install the google-cloud-sdk additional components
ansible.builtin.apt:
name: "google-cloud-sdk-{{ item }}"
name: google-cloud-sdk-{{ item }}
update_cache: "yes"
register: task_result
until: task_result is success

View file

@ -4,16 +4,16 @@
name: google-cloud-sdk
description: Google Cloud SDK
baseurl: https://packages.cloud.google.com/yum/repos/cloud-sdk-el7-x86_64
enabled: yes
gpgcheck: yes
repo_gpgcheck: yes
enabled: true
gpgcheck: true
repo_gpgcheck: true
gpgkey:
- https://packages.cloud.google.com/yum/doc/yum-key.gpg
- https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
- name: Gcloud | RHEL | Install the google-cloud-sdk package
ansible.builtin.yum:
name: "google-cloud-sdk"
name: google-cloud-sdk
update_cache: "yes"
register: task_result
until: task_result is success
@ -22,7 +22,7 @@
- name: Gcloud | Debian | Install the google-cloud-sdk additional components
ansible.builtin.yum:
name: "google-cloud-sdk-{{ item }}"
name: google-cloud-sdk-{{ item }}
update_cache: "yes"
register: task_result
until: task_result is success