Skip to content

Using Ansible with Google Cloud Platform inventory source

Notifications You must be signed in to change notification settings

sunnyvale-it/ansible-gcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Using Ansible with Google Cloud Platform inventory source

Check if Ansible google.cloud plugin collection is already installed

$ ansible-galaxy collection list | grep google.cloud
google.cloud                  1.0.2

If not install the Ansible google.cloud plugin collection

$ ansible-galaxy collection install google.cloud

Before proceeding, open the misc/inventory.gcp.yml file and change the following params, according to your environment:

projects:
  - myproj
service_account_file: credentials.json

Test the inventory creation

$ ansible --list-hosts all

Test the connection to computes

$ ansible -m ping all 

Using playbook

$ CLOUDSDK_PYTHON_SITEPACKAGES=1 ansible-playbook test.yml 

About

Using Ansible with Google Cloud Platform inventory source

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages