Commit Graph

302 Commits (23b55992446887ea8100766c95008292c9b8f311)

Author SHA1 Message Date
Alex Stephen 5b0ce0222b Bug fixes for GCP Compute Address (#38630) 2018-05-04 14:41:55 -04:00
Alex Stephen e177cf5831 New module: GCP Pubsub Topics (#38627) 2018-05-04 14:32:28 -04:00
Alex Stephen e116c6cee8 New module: GCP Pubsub Subscriptions (#38626) 2018-05-04 14:31:34 -04:00
Alex Stephen 478759a686 New module: GCP Compute Subnetworks (#38621) 2018-05-04 14:29:38 -04:00
Alex Stephen 01f0e4ac6f New module: GCP Compute Networks (#38618) 2018-05-04 14:28:11 -04:00
Alex Stephen 768a81dd4b New module: GCP Compute Routes (#38619) 2018-05-04 14:27:29 -04:00
Alex Stephen b6aa132033 New module: GCP Compute Backend Services (#38611) 2018-05-02 16:59:27 -04:00
Alex Stephen 394abba1b9 New module: GCP Compute Backend Buckets (#38610) 2018-05-02 14:57:00 -04:00
Alex Stephen 18b463e17b New module: GCP Container Clusters (#37324) 2018-04-30 15:04:56 -04:00
Alex Stephen d39b1ff664 New module: GCP Storage Bucket Access Controls (#37289) 2018-04-30 14:03:02 -04:00
Alex Stephen dd735b2122 Bug fixes for GCP Dns Managed Zones (#38631) 2018-04-25 16:20:55 -04:00
Alex Stephen 8d77c6cc16 Adding support for GCP Compute Https Health Checks (#37437) 2018-04-25 16:11:32 -04:00
Alex Stephen 58bf4ae611 New module: GCP Storage Buckets (#37288) 2018-04-25 15:26:13 -04:00
Alex Stephen 39bf7d3655 New module: GCP Compute HTTP Health Checks (#36329) 2018-04-25 15:25:23 -04:00
Alex Stephen 9de9633cac [GCP] New module GCP DNS Resource Record Set (#35920) 2018-04-12 07:31:43 -04:00
Alex Stephen d129396274 GCP: Compute IP Addresses (#36325) 2018-04-02 16:42:49 -04:00
Dag Wieers cdd21e2170
Clean up module documentation (#36909)
* Clean up module documentation

This PR includes:
- Removal of `default: None` (and variations)
- Removal of `required: false`
- Fixing booleans and `type: bool` where required

* Fix remaining (new) validation issues
2018-03-15 22:15:24 +01:00
Sebastian Gumprich 16c564c4b4 fix spelling mistakes in several modules (#36296)
* fix more spelling mistakes

* fix spelling mistakes
2018-03-12 11:00:19 +01:00
Alex Stephen 9706abf685 [cloud] New GCP module: DNS Managed Zones (gcp_dns_managed_zone.py) (#35014) 2018-02-06 11:50:16 -05:00
Matt Clay 227ff61f9d
Add module support to yamllint sanity test. (#34964)
* Add module support to yamllint sanity test.
* Fix duplicate keys in module RETURN docs.
* Fix syntax in return_common docs fragment.
* Fix duplicate keys in module EXAMPLES docs.
2018-01-16 15:08:56 -08:00
Pilou bd38359ddc gcdns_zone: fix broken import (#34076)
* fix broken import
* whole project requires Python >= 2.6
2018-01-04 09:32:47 -08:00
Pilou 107934241e gcdns_record: fix broken import (#34024) 2017-12-19 12:31:35 -05:00
John Barker c57a7f05e1 Bulk autopep8 (modules)
As agreed in 2017-12-07 Core meeting bulk fix pep8 issues

Generated using:
autopep8 1.3.3 (pycodestyle: 2.3.1)
autopep8 -r  --max-line-length 160 --in-place --ignore E305,E402,E722,E741 lib/ansible/modules

Manually fix issues that autopep8 has introduced
2017-12-07 20:25:55 +00:00
Remon van de Kamp 3b0ff03547 Fix typo in gce_labels documentation (#33186) 2017-11-22 13:55:48 +00:00
Dag Wieers 9d156c6cb1
docker: PEP8 compliancy and documentation changes (#32628)
This PR includes:
- PEP8 compliancy changes
- Documentation changes
2017-11-07 15:35:50 +01:00
Dag Wieers 4afb3bf76c
Fix small typo (#32625) 2017-11-07 14:22:15 +01:00
Nikhil Kathole 585ecc2867 gce: PEP8 compliancy Fixes (#32311)
* gce: PEP8 compliancy Fixes

* Documentation updates

* Documentation updates

* Documentation update
2017-11-07 14:19:17 +01:00
Satyajit Bulage 52aa522c19 google: PEP8 compliancy fixes (#32309)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes

Signed-off-by: Satyajit Bulage <sbulage@redhat.com>
2017-10-31 10:53:31 +01:00
evancarter-iex d6520c64b3 gce_instance_template: fix allow the setting of the service account (#29154) 2017-10-16 16:00:07 +02:00
Matt Clay 68aeaa58a8 Fix dangerous default args. (#29839) 2017-09-12 00:11:13 -07:00
Doug Gorley 5e6984a34c Added support to GCE module for image families and external projects. (#26711)
* Added support to GCE module for image families and external projects.

* Added image_family and external_projects to gce_pd.

* Added version_added for new options.
2017-08-18 10:45:13 -04:00
Lukas Beumer eebc0cea6e [cloud][gcp] Add region and versioning parameter to gc_storage (#27802) 2017-08-17 15:58:29 -04:00
Toshio Kuratomi f203ca7907 Update metadata to 1.1 2017-08-15 23:12:08 -07:00
Toshio Kuratomi 4109a82d0a remove wildcards and add boilerplate
* cloud/centurylink
* source_control
* cloud/google
* notification
* cloud/rackspace
* cloud/vmware
2017-07-29 14:13:30 -07:00
Toshio Kuratomi 225fa5d092 Fix undefined variables, basestring usage, and some associated python3 issues 2017-07-25 15:58:23 -07:00
Eric Johnson 09e9203844 [google] adding a GCE labels module 2017-07-25 09:36:33 -04:00
Toshio Kuratomi d64e291274 Fix modules' use of BOOLEANS*
* The canonical location of BOOLEANS has moved.  Switch imports to use that.
* clean up argument_spec use of booleans.
* Clean up imports to not use wildcards
* Remove usage of get_exception
2017-07-17 11:48:05 -07:00
evancarter-iex c22ec81b99 gce_instance_template: Add ability to use disks_gce_struct (#25500)
* Add ability to use disks_gce_struct

* Fixed typos in the options section

* Spacing fixes
2017-07-12 16:36:05 -04:00
Jason DeTiberus d173217833 cloud: gce: Allow specifying scopes by URI (#25074)
Previously the gce module would only allow scopes to be specified by
alias, this adds support for specifying scopes by full URI, however
validation is limited to just ensuring the URI begins with:
https://www.googleapis.com/auth
2017-07-11 15:12:10 -04:00
Abhijeet Kasurde b89cb95609 Fix spelling mistakes (comments only) (#25564)
Original Author : klemens <ka7@github.com>

Taking over previous PR as per
https://github.com/ansible/ansible/pull/23644#issuecomment-307334525

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-06-12 07:55:19 +01:00
evancarter-iex 3a2699f1bf gce_instance_template: Fix subnetwork not working (#25231)
* Fix problem with subnetwork not working

It is broken in the current master branch. This fixes it.

* Fix missing version_added
2017-06-01 10:19:19 -07:00
Abhijeet Kasurde 07be5f2b67 spelling fixes (non-trivial, changing messages) (#25094)
Multiple spell fixes in single commit.
Taking over existing PR as per comment -
https://github.com/ansible/ansible/pull/23645#issuecomment-304312275

Original Author: klemens <ka7@github.com>

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-06-01 10:45:19 +01:00
Yap Sok Ann 24cfb10ce9 gce_net: change default to match with b7e78656 for idempotency (#23555)
After b7e78656, if `src_range`, `src_tags` or `target_tags` is left as
null, the firewall rule would always be recreated.
2017-05-31 11:02:22 -04:00
Lars Larsson 53baa36a8b [cloud][GCE] fix bug in persistent disk snapshot naming (#23218)
snapshot_name keeps on prepending the device_name to the same string if more than one device.
result is: disk3-disk2-disk1-MySnapshot
2017-05-18 16:08:14 -04:00
Tom Melendez 13f2d9222f [GCP] Global Load Balancer Integration Test (#24704)
* Revert to using url_map internal to the module to allow parameter generation to work. module parameter is still url_map_name.

* [GCP] Cross Region Load Balancer Integration Test
2017-05-18 14:00:51 -04:00
Tom Melendez c99c3b2b5d [GCP] Healthcheck module (#24564)
* [GCP] Healthcheck module

* fix return YAML block

* removed update_ return value; removed python26 check; typos and docs updates

* doc fix

* Updated int test for no-update conditions

* added filter_gcp_fields test

* fixed bug in update where dictionary wasn't built correctly and port was not being set.

* added default values to documentation block
2017-05-18 12:49:50 -04:00
Tom Melendez 07c55b855a [GCP] Forwarding Rule module (#24627)
* [GCP] Forwarding Rule module

* pep8 formatting for tests

* remove py26 check and updated_ key; docs and typo fixes
2017-05-16 16:40:34 -04:00
Tom Melendez 29decad261 [GCP] Target Proxy Module (#24527)
* [GCP] Target Proxy Module

* pep8 fix

* updates from review: removed 26 check, fix get method, typos, renamed url_map to url_map_name

* removed blank line
2017-05-16 15:25:12 -04:00
Tom Melendez 4a5cf0b5c1 [GCE] [GCP] UrlMap module (#24422)
* [GCP] UrlMap module

This module provides support for UrlMaps on Google Cloud Platform.  UrlMaps allow users to segment requests by hostname and path and direct those requests to Backend Services.

UrlMaps are a powerful and necessary part of HTTP(S) Global Load Balancing on Google Cloud Platform.

UrlMap takes advantage of the python-api so the appropriate infrastructure has been added to module_utils.

More about UrlMaps can be found at:
https://cloud.google.com/compute/docs/load-balancing/http/url-map

UrlMap API:
https://cloud.google.com/compute/docs/reference/latest/

Google Cloud Platform HTTP(S) Cross-Region Load Balancer:
https://cloud.google.com/compute/docs/load-balancing/http/

* updated documentation, remmoved parens

* fixed tabs
2017-05-11 13:02:32 -04:00
Andrea Tartaglia 1d0a629dcc Fixed docs for cloud modules (#23745)
* Fixed docs for cloud modules

* removed blank line in ec2_snapshot_facts
2017-04-27 12:01:11 +01:00
Tom Melendez 8b677e25c4 [cloud][GCP]: New module gcp_backend_service for load balancer backends (#22857)
* GCP: backend service module

* GCP: rework param-checking code. Fixed a couple of bugs and changed to ValueError instead of custom tuple.

* GCP: fixed commit, spelled out Google Cloud for clarity in module description.
2017-03-30 16:59:35 -04:00
Matt Martz 3164e8b561 E501 fixes (#22879) 2017-03-22 20:50:28 -05:00
Matt Martz 02f66b9369 E1 legacy pep8 fixes (#21933)
* E1 pep8 fixes

* e111 fix for rds.py
2017-03-21 21:19:40 -05:00
Tom Melendez 1c38cba7ca [GCE] Invalid zone reported through fail_json
* added new helper function for zones and regions.
* modified GCE module to use it

Fixes: ansible/ansible#20616
2017-03-20 10:15:39 -04:00
Toshio Kuratomi eb1214baad New metadata 1.0 (#22587)
Changes to the metadata format were approved here:
https://github.com/ansible/proposals/issues/54
* Update documentation to the new metadata format
* Changes to metadata-tool to account for new metadata
  * Add GPL license header
  * Add upgrade subcommand to upgrade metadata version
  * Change default metadata to the new format
  * Fix exclusion of non-modules from the metadata report
* Fix ansible-doc for new module metadata
* Exclude metadata version from ansible-doc output
* Fix website docs generation for the new metadata
* Update metadata schema in valiate-modules test
* Update the metadata in all modules to the new version
2017-03-14 09:07:22 -07:00
Johannes Kohnen cc2eecc247 Enable path expansion in GCE modules
This is basically a replay of #16064 from `gce.py` to other pertinent
`gce_*.py` files. It enables expansions of paths in `gce.ini` like
`~/.project.json`
2017-03-12 16:55:43 -04:00
GwenaelPellenArkeup 17a4a655a3 [cloud] New module: gce_template (#20918)
* add gce_template.py

gce template manage GCE Instance Templates in Google Cloud Plateform.

* change gce_template on style/formating

Apply change on style/formating from reviewer request.

* change gce_template on style/formating again.

* Rename gce_template.py to gce_instance_template.py

* update gce_instance_template.py to pass CI

Oops :)
ERROR: Import found before documentation variables. 
All imports must appear below DOCUMENTATION/EXAMPLES/RETURN/ANSIBLE_METADATA.

* Update gce_instance_template.py

change documentation replace gce_template by gce_instance_template

* Update gce_instance_template.py

Sorry for the typography fault. The day begins badly.

* Update gce_instance_template.py

apply text change
  s/Compte/Compute/
  s/Plateform/Platform/
  s/forword/forward/
change documentation for subnetwork, subnetwork is name.
add mutually_exclusive in AnsibleModule arguments.
change disk_type as an option type.

* Update gce_instance_template.py

change the documentation.

* Update gce_instance_template.py

RETURN is required for all new modules. Is empty because no new return variable returned.

* Update gce_instance_template.py

Ansible will verify that only present/absent are passed as the state. This else is not needed.
2017-03-01 16:50:07 -05:00
Tom Melendez 0c14548e5f [GCE] New module: Google Cloud Spanner (#21731)
* [GCE] Google Cloud Spanner module

Supports the creation/updating/deletion of Spanner instances and create/drop databases.

* [GCE] On update, node count will not be reset to one if not specified.

* [GCE] fixed some imports.

* [GCE] rename display_name to instance_display_name

* [GCE] Recreate instance in order to have desired values at create time.

* Fix linter error on imports

* [GCE] Added force_instance_delete option to ensure an instance is not removed by mistake.

* [GCE] Google Cloud Spanner module

Supports the creation/updating/deletion of Spanner instances and create/drop databases.

* [GCE] On update, node count will not be reset to one if not specified.

* [GCE] rename display_name to instance_display_name

* Fix linter error on imports

* fixed doc bug

* Remove imports mistakenly brought in during merge
2017-03-01 14:26:07 -05:00
Tom Melendez 0d3d8cbcd9 [GCE] Doc fixes for gce_net (#21524)
* Updated examples and added return block.

Doc fix only.  No logic or executable code modified in this commit.
2017-02-16 16:39:00 -05:00
Matt Martz 7c00346714 Validate EXAMPLES as YAML 2017-02-15 13:01:43 -08:00
Tim Rupp 22926088a0 Removes expanduser in favor of type 'path'
Removes the usage of expanduser because it is automatically handed
by specifying a type of 'path'. Related to #12263
2017-02-14 15:43:53 -05:00
Robert Simmons b7e78656ac [cloud] gce_net fix for unsetting firewall rule properties in the project. (#20483) 2017-02-08 08:49:04 -05:00
Matt Martz 829c0b8f62 Update validate-modules (#20932)
* Update validate-modules

* Validates ANSIBLE_METADATA
* Ensures imports happen after documentation vars
* Some pep8 cleanup

* Clean up some left over unneeded code

* Update modules for new module guidelines and validate-modules checks

* Update imports for ec2_vpc_route_table and ec2_vpc_nat_gateway
2017-02-02 11:45:22 -08:00
Tom Melendez 237b39556c [GCE] External IP Address Module. (#20779)
* [GCE] External IP Address Module.

This module allows users to create and delete External IP Addresses. Both Regional and Global Addresses are supported.

* Removed whitespace causing pep8 issue
2017-02-01 10:08:02 -05:00
Matt Clay 503e85ed0e PEP 8 E111 cleanup. 2017-01-30 20:33:31 -08:00
Matt Clay 85300883ef PEP 8 E111 cleanup. 2017-01-30 20:17:35 -08:00
Matt Clay cb76200c7d PEP 8 E111 & E114 cleanup. (#20838) 2017-01-30 15:01:47 -08:00
Matt Clay 10d9318de7 PEP 8 indent cleanup. (#20800)
* PEP 8 E121 cleanup.

* PEP 8 E126 cleanup.

* PEP 8 E122 cleanup.
2017-01-29 07:28:53 +00:00
Matt Clay e2c0b375d3 PEP 8 cleanup. (#20790)
* PEP 8 E115 cleanup.
* PEP 8 E131 cleanup.
2017-01-28 01:39:40 -08:00
Matt Clay d0d1158c5e PEP 8 cleanup. (#20789)
* PEP 8 E703 cleanup.
* PEP 8 E701 cleanup.
* PEP 8 E711 cleanup.
* PEP 8 W191 and E101 cleanup.
2017-01-28 00:12:11 -08:00
Matt Clay d913f69ba1 PEP 8 W291 whitespace cleanup. 2017-01-27 17:08:02 -08:00
Matt Clay 95789f3949 PEP 8 whitespace cleanup. (#20783)
* PEP 8 E271 whitespace cleanup.
* PEP 8 W293 whitespace cleanup.
* Fix whitespace issue from recent PR.
2017-01-27 15:45:23 -08:00
Rob Wagner e401b8e827 Created gce_snapshot module (#20057)
* Added support for a gce_snapshot module for managing snapshots in the Google Cloud Platform

* Fixed using sys.exit in favor of fail_json. Followed the pattern in gce_pd

* Fixed using sys.exit in favor of fail_json. Followed the pattern in gce_pd

* Fixed an issue when dealing with multiple disks. Added a bit more documentation explaining the disks argument

* Corrected a typo in the multi-disk snapshot example

* Updated module to return list of changed snapshots instead of just a message. Added a RETURN block
2017-01-27 16:18:30 -05:00
Robert Simmons 0e7dd18650 Fixed issue in gce_net with firewall rules that have protocols that d… (#20528)
* Fixed issue in gce_net with firewall rules that have protocols that do not have ports.

* Fixed elif in gce_net to include check of the ports variable.
2017-01-26 16:17:55 -05:00
Tom Melendez c2edc8a264 [GCE] Google Cloud Pubsub Module (#19091)
* Google Cloud Pubsub Module

The Google Cloud Pubsub module allows the Ansible user to:
* Create/Delete Topics
* Create/Delete Subscriptions
* Change subscription from pull to push (and configure endpoint)
* Publish messages to a topic
* Pull messages from a Subscription

An accessory module, gcpubsub_facts, has been added to list topics and subscriptions.

* Added docs for state field to DOCUMENTATION and RETURN blocks.
2017-01-26 16:16:52 -05:00
Daniel Andrei Mincă 27816dd284 update GCE instance image with Debian 8 Jessie (#20558)
* update instance image with Debian 8 Jessie

* debian-7 is marked as "DEPRECATED" in Google Compute Engine Images
  * as a result, by default use `debian-8` Jessie

Resolves:
Related:
Signed-off-by: Daniel Andrei Minca <danielandrei.minca@gameloft.com>

* update docs regarding latest stable default image

* after speaking with @gundalow, we decided it's better for the users to
  know that the default image will follow latest stable debian by GCE

Resolves: #20558
Related:
Signed-off-by: Daniel Andrei Minca <danielandrei.minca@gameloft.com>
2017-01-24 11:20:36 -05:00
rmarsa 32f39a195b Fixed bug where it was impossible to set non-ephemeral external ips. (#19701)
* Fixed bug where it was impossible to set non-ephemeral external ips.

* Fixed variable reference.
2017-01-18 14:13:59 -05:00
Laurent Goujon d3c17d632b gce_pd: add delete_on_termination option (#20201)
Add delete_on_termination option to gce_pd, which will delete the disk
when the attached instance is terminated.
2017-01-18 13:52:23 -05:00
jayme-github f813a8474b Allow the use of paths like ~/.project.json (#16064)
* Allow the use of paths like ~/.project.json

This makes it easy to manage credentials files outside of the repo
(and/or user specific credentials).

* Fix format string to log credentials_file.
2017-01-16 09:10:16 -05:00
rmarsa 1d80a8dbfb Added the ability to set the size of the boot volume. (#19703)
* Added the ability to set the size of the boot volume.

* Made disk_size parameter of type int with 10 default.
2017-01-11 16:08:31 -05:00
Tom Melendez 89f232ad8a [GCE] gc_storage: add type parameter to expiration in argument_spec. (#19979)
Fixes ansible/ansible#19568
2017-01-06 13:27:47 -05:00
Ryan S. Brown 7a074b69a0 gce_net module: fail when no libcloud is found 2017-01-06 09:05:52 -05:00
Tom Melendez d09ad82e71 Add regex support to gce_tag module, add unit tests and update integration test. (#19087)
The gce_tag module can support updating tags on multiple instances via an instance_pattern field.  Full Python regex is supported in the instance_pattern field.

'instance_pattern' and 'instance_name' are mutually exclusive and one must be specified.

The integration test for the gce_tag module has been updated to support the instance_pattern parameter.  Unit tests have been added to test the list-manipulation functionality.

Run the integration test with:

TEST_FLAGS='--tags "test_gce_tag"' make gce

Run the unit tests with:

python test/units/modules/cloud/google/test_gce_tag.py
2016-12-29 08:45:20 -05:00
Matt Clay c709b22e5c Fix differences with devel. 2016-12-08 11:35:21 -05:00
James Cammarata 011ea55a8f Relocating extras into lib/ansible/modules/ after merge 2016-12-08 11:35:18 -05:00
James Cammarata 8afa090417 Resolving differences in core modules post-merge 2016-12-08 11:25:36 -05:00
Toshio Kuratomi 7319104552 Refreshed metadata for core modules 2016-12-08 11:25:35 -05:00
Fabio Alessandro Locati 8b7db84e91 Native YAML - cloud/google/gce.py (#5800) 2016-12-08 11:25:34 -05:00
Dag Wieers 54fdff16db Performance improvement using in-operator on dicts
Just a small cleanup for the existing occurrences.

Using the in-operator for hash lookups is faster than using .keys()
http://stackoverflow.com/questions/29314269/why-do-key-in-dict-and-key-in-dict-keys-have-the-same-output
2016-12-08 11:25:31 -05:00
Sam Doran 38c0769abb Examples syntax batch5 (#5622)
* Change example syntax on supervisorctl module

* Change example syntax or _ec2_ami_search module

* Change example syntax on cloudformation module

* Change example syntax on ec2 module

* Change example syntax on ec2_facts module

* Change example syntax on ec2_eip module

* Change example syntax on rds module

* Change example syntax on route53 module

* Change example syntax on s3 module

* Change example syntax on digital_ocean module

* Change example syntax on docker_service module

* Change example syntax on cloudformation module

* Change example syntax on gc_storage module

* Change example syntax on gce module

* Change example syntax on gce_mig module

* Change example syntax on _glance_image module

* Change example syntax on _keystone_user module

* Change example syntax on _nova_keypair module

* Change example syntax on _quantum_floating module

* Change example syntax on _quantum_floating_ip_associate module

* Change example syntax on _quantum_network module

* Change example syntax on _quantum_router module

* Change example syntax on _quantum_router_gateway module

* Change example syntax on _quantum_router_interface module

* Change example syntax on _quantum_subnet module

* SQUASH _quantum_subnet

* Add missing quotes
2016-12-08 11:25:31 -05:00
Tom Melendez b85bcb71c3 Support for named_ports in Managed Instance Groups. A libcloud guard has been implemented, as this feature will only be available in libcloud >= 1.3, or by using trunk. (#5167) 2016-12-08 11:25:26 -05:00
John Baublitz 352b620665 GCE: Add support for 'number' parameter for manually provisioned Google Compute clusters (#4276)
* Add option for number parameter to generate manually provisioned clusters from a base name

* Refactor code to work with starting and stopped when number is specified

* Update docs

* Fix documentation error breaking Travis

* Fixes for async gce operations

* Fix documentation

* base_name from parameter to alias for name and fixes for renaming variables

* Fix breaking change on gce.py

* Fix bugs with name parameter

* Fix comments for Github build checks

* Add logic to set changed appropriately for cluster provisioning
2016-12-08 11:25:22 -05:00
Tom Melendez a4077537e0 Added libcloud guard for Managed Instance Groups. (#4911) 2016-12-08 11:25:20 -05:00
Tom Melendez 72635db94d GCE module examples update. Correct syntax, demonstrate other options and creation of multiple instances. (#5192) 2016-12-08 11:25:20 -05:00
Tom Melendez ea76dedadf Support for GCE Managed Instance Groups. (#4541)
Create, Delete, Resize and Recreate (of instances) supported.  Autoscalers are also supported.
2016-12-08 11:25:09 -05:00
Tom Melendez 35acdec063 Document ability to disable external IP with 'none' setting. Closes #2562. (#4878) 2016-12-08 11:25:06 -05:00
John Baublitz fe09641476 Doc update 2016-12-08 11:24:45 -05:00
John Baublitz c8dc0bf5c9 Fix exception handling to be compatible with Python 3 2016-12-08 11:24:45 -05:00
John Baublitz 4b11312737 Additional error handling for corner cases like deleting networks with active subnetworks 2016-12-08 11:24:45 -05:00
John Baublitz e4697c3780 Documentation 2016-12-08 11:24:45 -05:00
John Baublitz 96599a5963 Logic to allow subnet creation 2016-12-08 11:24:45 -05:00
John Baublitz 5591e6bb0b Add error handling for specifying 'mode' with insufficiently recent libcloud 2016-12-08 11:24:45 -05:00
John Baublitz 9c9b22dc8f Changes to allow 'auto' mode which does not allow IP address specification 2016-12-08 11:24:45 -05:00
John Baublitz 839871d87b Support for newer networking modes in GCE 2016-12-08 11:24:45 -05:00
John Baublitz 906b457bf1 Collapse boilerplate code into change_instance_state function 2016-12-08 11:24:45 -05:00
John Baublitz eb97165acc Add states for stopping and starting machines 2016-12-08 11:24:44 -05:00
Tom Melendez 067bb6ec01 Added helper function and logic to sort attributes before comparing. 2016-12-08 11:24:44 -05:00
Tom Melendez 8becd9a14d Allow GCE firewall rules to be updated when attributes changes. Fixes #2111.
Previously, when the attributes of a GCE firewall change, they were ignored.  This PR changes that behavior and now updates them.

Note that the "update" also removes attributes that are not specified.

An overview of the firewall rule behavior is as follows:

1. firewall name in GCP, state=absent in PLAYBOOK: Delete from GCP
2. firewall name in PLAYBOOK, not in GCP: Add to GCP.
3. firewall name in GCP, name not in PLAYBOOK: No change.
4. firewall names exist in both GCP and PLAYBOOK, attributes differ: Update GCP to match attributes from PLAYBOOK.
2016-12-08 11:24:44 -05:00
nitzmahone 570defc6d8 correct gs_storage docs to match reality 2016-12-08 11:24:35 -05:00
Gilles Gagniard bbfea348df better error message if libcloud is not recent enough to use gce subnetworks 2016-12-08 11:24:34 -05:00
Gilles Gagniard 152a713fd3 fix documentation to reflect subnetwork option is new in ansible 2.2 2016-12-08 11:24:34 -05:00
Gilles Gagniard 3404c0891b Initial support for specifying in which subnetwork a gce instance should be created. This is required for non-legacy networks. 2016-12-08 11:24:34 -05:00
@ 13bebda244 Fixing gce compile time errors irt exception handling for Python 3 (#3845) 2016-12-08 11:24:34 -05:00
Anton Simernia 1aa1b617f5 Update gc_storage.py (#3802) 2016-12-08 11:24:33 -05:00
Toshio Kuratomi 291e00d43a Docs fixes 2016-12-08 11:24:28 -05:00
curious-eyes 5b88ad45ef Add preemptible option on gce.py 2016-12-08 11:24:14 -05:00
curious-eyes e16367739e Fix #2761: gce.py - UnboundLocalError: local variable 'md' 2016-12-08 11:24:10 -05:00
Tim Alkemade be19982313 GCE module does not fetch disk images if not necessary 2016-12-08 11:24:09 -05:00
daniel-sc f654bd45f8 Allowing specifying ip by address 2016-12-08 11:23:59 -05:00
daniel-sc 40565b7293 Allowing to specify specific external ip for gce instances 2016-12-08 11:23:59 -05:00
Marios Andreopoulos 1ae765d61f fix: do not set scopes account to service account used for instance creation 2016-12-08 11:23:58 -05:00
Vic Iglesias 353db36515 Update GCE PEM deprecation text and examples 2016-12-08 11:23:56 -05:00
Vic Iglesias 612d9c3e92 Use credentials_file for GCE module auth config 2016-12-08 11:23:55 -05:00
Toshio Kuratomi 7a492764d0 Fix up documentation 2016-12-08 11:23:54 -05:00
Pedro Romano bcae9a2b5e GCE libcloud 0.15 support and code cleanup * Code formatting (indentation and white space) fixes for improved PEP8 conformity. * Remove redundant backslashes inside parentheses. * Test for object identity should be 'is not None'. * Test for membership should be 'not in'. * Fit docstring to the PEP8 79 character limit. * Use forward compatible Python 2.6+ 'except .. as' syntax for exception handling. * Support libcloud > 0.15 'metadata' argument format. 2016-12-08 11:23:53 -05:00
Jumpei Ogawa ebb0d6301d Add explanation in case that ipv4_range is required 2016-12-08 11:23:51 -05:00
Jumpei Ogawa 256c840942 Add better error message when specified network doesn't exist and ipv4_range is not specified 2016-12-08 11:23:51 -05:00
Till Backhaus e005ef0c36 Delete dead and broken code 2016-12-08 11:23:33 -05:00
khassen 8b60dd349d Use the common/shared MD5 function. 2016-12-08 11:23:25 -05:00
Alan Scherger 861d260b6c fix docs; only delete network if fwname is not provided 2016-12-08 11:23:23 -05:00
HelenaTian 1b614172f5 Update gce.py to correctly handle propagated metadata type from a mother template
My project is using Ansible to automate cloud build process. Ansible has a core module gce.py for managing GCE instances.
  We've come across a use case that's not yet supported - when executing ansible-playbook, if a child template is included, then metadata which is defined in and propagated from the mother template is treated as string type and not parsed correctly(which instead is dictionary type), and triggers release flow failure.
   We currently put some fix by explicitly casting metadata to string type in our own branch, but would like to contribute the fix to Ansible so that everyone onboarding GCE and using Ansible for release management could benefit from it, or hear owner's opinion on fixing the issue if there's a better fix in owner's mind:)
2016-12-08 11:23:23 -05:00
James Cammarata 5cd3c6ebe6 Update choices and version_added for new gce.py param service_account_permissions 2016-12-08 11:23:11 -05:00
Vasyl Kaigorodov 758688a667 GCE module: added Service Account permissions sanity checks 2016-12-08 11:23:10 -05:00
Vasyl Kaigorodov 4400c5e163 GCE module: document Service Account permissions parameter usage 2016-12-08 11:23:10 -05:00
Vasyl Kaigorodov 97e880a27f GCE module: add posibility to specify Service Account permissions during instance creation 2016-12-08 11:23:10 -05:00
Greg DeKoenigsberg 18ca7aee07 Updating cloud modules with proper github author information 2016-12-08 11:23:07 -05:00
Toshio Kuratomi 5336217649 Several cleanups to many modules:
* Fix docs to specify when python2.6+ is required (due to a library
  dep).  This helps us know when it is okay to use python2.6+ syntax in
  the file.
* remove BabyJson returns.  See #1211  This commit fixes all but the
  openstack modules.
* Use if __name__ == '__main__' to only run the main part of the module
  if the module is run as a program.  This allows for the potential to
  unittest the code later.
2016-12-08 11:22:58 -05:00
Matt Martz 0b4fec0a06 Don't use a dict comprehension, be more verbose 2016-12-08 11:22:53 -05:00
Richard Tier 0a48d54c1c added version to docstring 2016-12-08 11:22:53 -05:00
Richard Tier 0c1624f9b7 allow setting header 2016-12-08 11:22:52 -05:00
Robert Marsa b7649cc5ca Added multiple allowed ranges. 2016-12-08 11:22:49 -05:00
Lev Popov 5f31654704 Allow to keep instance boot disk after instance deletion in google cloud module 2016-12-08 11:22:46 -05:00
Lev Popov 6d1fd1afcc Allow to spawn instances without external ip in google cloud module 2016-12-08 11:22:46 -05:00
Robert Marsa 4737b41f26 Added the ability to set an instance to forward ip. 2016-12-08 11:22:42 -05:00
Robert Marsa bf3cb32c1b Added target_tags to gce_module. 2016-12-08 11:22:41 -05:00
Peter Mooshammer d741b57b91 adding disk_type option to choose from pd-ssd or pd-standard 2016-12-08 11:22:40 -05:00
Vasyl Kaigorodov d41ec7027f gce_net - creating firewall rule, src_range value seems to get lost or set to empty string -- fixes #252 2016-12-08 11:22:37 -05:00
Toshio Kuratomi 37f237ecfc Fixup the directory name at a higher level so it can be used by both conditional branches
Fixes #500
2016-12-08 11:22:32 -05:00
Robert Estelle 4e2d05b1f3 Remove incorrect executable permissions. 2016-12-08 11:22:26 -05:00
Adam Miller c707107e1b fix gce_net add firewall rule example 2016-12-08 11:22:26 -05:00
Brian Coca 5a467bc72c added __init__.py to new cloud subcategories so builds work again 2016-12-08 11:22:25 -05:00
Brian Coca 32e85c0944 made subcategories for cloud modules for better organization 2016-12-08 11:22:24 -05:00