The best way to interact with your hosts is to use the gcp_compute inventory plugin, which dynamically queries GCE and tells Ansible what nodes can be managed.
The best way to interact with your hosts is to use the gcp_compute inventory plugin, which dynamically queries GCE and tells Ansible what nodes can be managed.
To use the gcp_compute inventory plugin, create a file that ends in .gcp.yml file in your root directory. The gcp_compute inventory script takes in the same authentication
To be able to use this GCE dynamic inventory plugin, you need to enable it first by specifying the following in the ``ansible.cfg`` file:
information as any module.
..code-block:: ini
[inventory]
enable_plugins = gcp_compute
Then, create a file that ends in ``.gcp.yml`` in your root directory.
The gcp_compute inventory script takes in the same authentication information as any module.
Here's an example of a valid inventory file:
Here's an example of a valid inventory file:
@ -130,7 +138,7 @@ Here's an example of a valid inventory file: