Installing the GCP Python SDK
According to the Ansible Community documentation (https://docs.ansible.com/ansible/latest/index.html), the Ansible GCP modules require both the requests and google-auth Python libraries to be installed. The first is a popular package to interact with REST APIs (e.g., the Google orchestration system), and the second is the Google package to authenticate against their respective APIs.
- First, let’s check that the
google.cloudAnsible collection is installed. This step is important because, at the time of writing, there is an open issue that will remove this collection from the Ansible package from Ansible 12 (because of a requirements violation). If it’s not installed, you can install it withansible-galaxy collection install google.cloud:root@cookbook-lab:~/cookbook-lab# ansible-galaxy collection list google.cloud # /usr/local/lib/python3.10/dist-packages/ansible_collections Collection Version ---...