Commit Graph

50 Commits (ff923fb6b095eb0f23226f84312780c340030acc)

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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 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 35acdec063 Document ability to disable external IP with 'none' setting. Closes #2562. (#4878) 2016-12-08 11:25:06 -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
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
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
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
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 Estelle 4e2d05b1f3 Remove incorrect executable permissions. 2016-12-08 11:22:26 -05:00
Brian Coca 32e85c0944 made subcategories for cloud modules for better organization 2016-12-08 11:22:24 -05:00