Ansible role to install Google Cloud CLI linux. Forked from labasubagia.gcloud but heavily re-scripted.
This is installs using standard install method on GCloud website. Installs system wide (for all users).
- Ansible Core >= 2.16
- Tested Linux Distribution
- Debian 12
- Ubuntu 24.04
- Fedora 40
Note: Other (and/or newer) distributions likely to work but not been tested
The following variables will change the behavior of this role (default values are shown below):
## google recommends to install gcloud sdk in user directory, not as root
gcloud_additional_components: []rm -rf ~/.ansible/roles/
molecule test --all
molecule test --all --driver-name=podman
molecule test --all -d docker
yamllint -v . && ansible-lint -v . && molecule test --all
tox
tox -p auto # Runs tox environments in parallel, depending on local cpu core count and depends clause.
tox -e lint # Runs only lint tox environment
tox -e fedora40 # Runs only fedora40 tox environment, if it depends on another tox environment, that should also execute.
- hosts: servers
roles:
- role: hammadrauf.gcloud
vars:
gcloud_additional_components:
- gke-gcloud-auth-plugin
- kubectlMIT
This Forked maintained by Hammad Rauf