diff options
author | Paul Puschmann <paul.puschmann@gmail.com> | 2019-04-10 18:50:06 +0200 |
---|---|---|
committer | Alicia Cozine <879121+acozine@users.noreply.github.com> | 2019-04-10 11:50:06 -0500 |
commit | 4b2841344623e3de51a17ec7a24e13508267f950 (patch) | |
tree | 37b1af403da38662a6e6a3ec7e1791669d4ceb97 /docs/docsite | |
parent | f030191782cb88a7a64ca1f7a4a7b1880bf1d13d (diff) | |
download | ansible-4b2841344623e3de51a17ec7a24e13508267f950.tar.gz |
Backport/2.7/50183 (#55035)
* gcp: documentation update (#50183)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit ae404d1476c621d26662b9eb6ab0d148b465b998)
* Add changelog-document for gcp_inventory improvement
Diffstat (limited to 'docs/docsite')
-rw-r--r-- | docs/docsite/rst/scenario_guides/guide_gce.rst | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/docs/docsite/rst/scenario_guides/guide_gce.rst b/docs/docsite/rst/scenario_guides/guide_gce.rst index 77a1715472..b585fead4b 100644 --- a/docs/docsite/rst/scenario_guides/guide_gce.rst +++ b/docs/docsite/rst/scenario_guides/guide_gce.rst @@ -121,8 +121,16 @@ GCE Dynamic Inventory 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 -information as any module. +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: + +.. 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: @@ -130,7 +138,7 @@ Here's an example of a valid inventory file: plugin: gcp_compute projects: - - google.com:graphite-playground + - graphite-playground filters: auth_kind: serviceaccount service_account_file: /home/alexstephen/my_account.json |