Commit graph

34 commits

Author SHA1 Message Date
Yusuke Tsutsumi
a9545c77a4 fix linting and updating maintenance guide
Updating the maintainers guide with updated intructions from
Ansible engineers.

Fixing linting issues, and adding the linter as a GitHub workflow
to ensure there are no regressions.
2022-12-07 15:36:21 -08:00
Andrew Dolgov
32e7eea25f Rename base_domain to name_suffix, make adjustments based on PR feedback 2022-11-28 21:59:00 -08:00
Andrey Dolgov
0114ee23d5 Add custom domain suffix option (base_domain) 2022-11-28 21:59:00 -08:00
Yonas Dresen
85e48b588b Add inventory hostname label support 2021-10-21 12:25:06 +02:00
Igor Simonov
ccbde5f93e fix documentation for correct work inventory plugin 2021-07-27 21:25:21 +03:00
kkr16
7590058e95 Fetch projects in folder based on projectID instead of name 2021-02-28 22:23:44 -05:00
AlanCoding
fe241cd2ca
Change imports to work inside collection 2020-05-03 23:04:54 -04:00
Alan Rominger
0471d79d2f
Use fully-qualified name in inventory plugin (#167) 2020-03-18 11:22:58 -04:00
Alex Stephen
10f07ebe34 gcp inventory plugin update 2020-03-17 09:26:43 -07:00
Alex Stephen
2800cae3ca PR 66511 2020-01-23 20:52:59 -08:00
Alex Stephen
66cb57dfc6 gcp_compute refactor (#61249)
* wip

* it works!

* cache should work

* ran black on code

* wip

* now it works

* black
2019-09-12 11:02:34 -07:00
Alex Stephen
64e9973ae8 nonetype error (#60603) 2019-09-12 11:02:34 -07:00
Elijah DeLee
09479a9fa0 Remove extra print statement (#59104)
Let ansible-inventory handle all output
Fixes #59101
2019-09-12 11:02:34 -07:00
Strahinja Kustudic
d0ae3b5d1e Fix version_added for gcp_compute 2019-09-12 11:02:34 -07:00
Strahinja Kustudic
85cdf91048 Add service_account_contents parameter to allign with the modules (#57848) 2019-09-12 11:02:34 -07:00
Alex Stephen
80503bb976 better metadata formatting on gcp_compute (#57778) 2019-09-12 11:02:34 -07:00
Strahinja Kustudic
64fb6d5ce0 Added environment variables to gcp_compute to align with gcp_* modules (#57776)
Added all variables that are also used by the gcp_* modules as described
in the docs
https://docs.ansible.com/ansible/latest/scenario_guides/guide_gce.html#providing-credentials-as-environment-variables
2019-09-12 11:02:34 -07:00
LucasBoisserie
ae9dd53c92 Remove required field on service_account_file in gcp_compute plugin inventory (#57345) 2019-09-12 11:02:34 -07:00
Strahinja Kustudic
23e26bf6cd Improve speed of the gpc_compute dynamic inventory (#57591)
To get all instances gcp_compute made a call to the Google API for each
zone separately. Because of this if all zones needed to be queried
fetching hosts lasted 30+ seconds. Now the module will use a single
query that will return all the instances, so the execution should last
just a few seconds.

This commit also suppresses a warning from the google-auth library about
using user credentials because if an Ansible user wants to use user
credentials, there is no need to warn him about it.
2019-09-12 11:02:34 -07:00
Brian Coca
0752ca5bed Not native, but text (#55676)
* use to_text instead of to_native
* cleaned up some imports and other pyflakisms
* fix missing lib messages
2019-09-12 11:02:34 -07:00
Alex Stephen
0d88614720 return actual error from module logic on gcp_compute (#55055)
* return actual error from module logic on gcp_compute

* changing how the error is presented

* sanity
2019-09-12 11:02:34 -07:00
Alan Rominger
26de6c9388 optionally get service account file path from env var (#54407) 2019-09-12 11:02:33 -07:00
Adam Miller
95da5c9c69 Bugfix/52688 gcp compute missing image (#54468)
* adding (optionally) image information to inventory var
* add boot image mapping to gcp_compute instance data for all disk
image data in the configured zones

Signed-off-by: Adam Miller <admiller@redhat.com>
2019-09-12 11:02:33 -07:00
Brian Coca
b077e3233b restored configurabilty of scopes (#54485) 2019-09-12 11:02:33 -07:00
Brian Coca
862bb52222 fixing gcp inv plugin (#54426)
* start fixing gcp inv plugin

* minor fixes

* added clog

* ajust comments

* link indv zone/project

* separate specific zone/project from other params

* restoring zones query per project

* also work when zones given

* fixed scopes, removed incorrect docs as not option
2019-09-12 11:02:33 -07:00
Sloane Hertel
9929887c70 Update inventory caching to remove deprecation warnings (#53976) 2019-09-12 11:02:33 -07:00
Brian Coca
fe65ed63ed Overridable safety (#53458)
* create overridable sanitation function
* now used in aws, gce and azure plugins
* added new option to these plugins to work in conjunction with general toggle to make it easier
  to emulate inventory script behavior.
2019-09-12 11:02:33 -07:00
Alan Rominger
72ab605225 Put in documented default for gcp_compute filters (#50025) 2019-09-12 11:02:33 -07:00
Ids van der Molen
1e25d0e889 gcp_compute: Add vars_prefix to prefix host_vars (#49601)
* Add vars_prefix to prefix host_vars

* Set vars_prefix default to empty string
2019-09-12 11:02:33 -07:00
Sloane Hertel
673c7cd803 add more consistent extension matching for inventory plugins (#46786)
* Add consistent extension matching for inventory plugins that support YAML configuration files

* Document extension matching expectations
2019-09-12 11:02:33 -07:00
Bob Lee
88743d11ae Update documentation for gcp_compute (#43791)
Added examples on how to use "keyed_groups", "hostnames", and "compose"

The compose example shows how to set the ansible_host var for a host to either the public or private ip. This is necessary when you set your hostname by name instead of ip
2019-09-12 11:02:33 -07:00
Brian Coca
e6c4e94687 added required missing field for common yaml fmt 2019-09-12 11:02:33 -07:00
Alex Stephen
03cdff340d GCP Inventory Plugin scopes fix 2019-09-12 11:02:33 -07:00
Alex Stephen
1519f8c652 GCP Inventory Plugin (#36884)
* Inventory

* Adding multi project support

* Adding multi project support

* Fixing PR comments and cleaning code

* Adding cache support
* Changed filter notation

* Inventory changes

* Better readability for zones, networks, subnetworks
* Added project to inventory output
* Using IP instead of hostname
* Keyed_groups support
* Use all zones when none provided.

* PR changes

* Doc changes
* Accepts *gcp_compute.yaml file names
* Added support for changing host naming precedent

* PR changes round 2

* Cache changes
* Changed verify_file function
* Misc style changes

* Cache fixes

* Fix docs for `hostnames` option.
2019-09-12 11:02:33 -07:00