Commit graph

60 commits

Author SHA1 Message Date
Ryan Brown
24db4de245 Merge pull request #4156 from supertom/ansible-2111-fix
Support updating GCE firewall rules when attributes change

Fixes #2111
2016-07-25 14:09:06 -04:00
John Baublitz
e85c2f8253 Collapse boilerplate code into change_instance_state function 2016-07-15 18:40:56 +00:00
John Baublitz
b5da9d190d Add states for stopping and starting machines 2016-07-14 18:16:40 +00:00
Tom Melendez
7c8d972d8f Added helper function and logic to sort attributes before comparing. 2016-07-13 19:56:43 +00:00
Tom Melendez
0f1c083d25 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-07-13 19:54:15 +00:00
Adrian Likins
97ac3f2cc8 Merge pull request #3701 from gillesgagniard/gce-subnetwork-dev
GCE : Add support for subnet networks
2016-06-13 15:33:27 -04:00
nitzmahone
2bd8d78a8b correct gs_storage docs to match reality 2016-06-03 10:42:51 -07:00
codemeup @ Work
d0a955452a Fixing gce compile time errors irt exception handling for Python 3 (#3845) 2016-06-03 06:35:34 -07:00
Anton Simernia
d30040f9dc Update gc_storage.py (#3802) 2016-05-31 12:27:18 -04:00
Gilles Gagniard
8231a1afc8 better error message if libcloud is not recent enough to use gce subnetworks 2016-05-20 03:53:27 -04:00
Gilles Gagniard
c859a9d339 fix documentation to reflect subnetwork option is new in ansible 2.2 2016-05-19 06:21:28 -04:00
Gilles Gagniard
2a008998fd Initial support for specifying in which subnetwork a gce instance should be created. This is required for non-legacy networks. 2016-05-19 03:53:49 -04:00
Toshio Kuratomi
298fd0ae56 Docs fixes 2016-05-13 11:01:19 -07:00
curious-eyes
24f1afc606 Add preemptible option on gce.py 2016-03-24 18:17:21 +09:00
Brian Coca
ad47bb91f1 Merge pull request #3132 from curious-eyes/fix-2761-gce-UnboundLocalError
Fix #2761: gce.py - UnboundLocalError: local variable 'md'
2016-03-08 12:45:09 -05:00
Tim Alkemade
c0734fde79 GCE module does not fetch disk images if not necessary 2016-03-01 08:17:52 +01:00
curious-eyes
858a8b8e67 Fix #2761: gce.py - UnboundLocalError: local variable 'md' 2016-02-27 22:28:18 +09:00
Daniel Petty
4bdd755412 replaced sudo with become 2016-02-18 16:18:22 -07:00
daniel-sc
44af735ac4 Allowing specifying ip by address 2016-01-12 22:57:31 +01:00
daniel-sc
a757af0264 Allowing to specify specific external ip for gce instances 2016-01-12 22:57:31 +01:00
Brian Coca
59f3b82898 Merge pull request #2633 from andmarios/devel
fix: don't set scopes' account to service account used for gce instance creation
2016-01-12 10:50:09 -05:00
Vic Iglesias
5a0965cfcd Update GCE PEM deprecation text and examples 2015-12-23 11:37:12 -08:00
Marios Andreopoulos
d3ef2ef11f fix: do not set scopes account to service account used for instance creation 2015-12-22 19:54:05 +02:00
Vic Iglesias
6cbcb8f8ae Merge branch 'devel' of https://github.com/ansible/ansible-modules-core into HEAD 2015-12-21 12:20:50 -06:00
Vic Iglesias
ec178225b0 Use credentials_file for GCE module auth config 2015-12-21 12:09:29 -06:00
Toshio Kuratomi
fcb3397df7 Fix up documentation 2015-12-18 22:22:55 -08:00
Pedro Romano
1bd04f797e 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.
2015-12-18 16:23:12 -08:00
Jumpei Ogawa
7b4b61faff Add explanation in case that ipv4_range is required 2015-09-17 15:37:07 +09:00
Jumpei Ogawa
08b09fcc70 Add better error message when specified network doesn't exist and ipv4_range is not specified 2015-09-17 15:31:14 +09:00
Till Backhaus
39e7e05a8d Delete dead and broken code 2015-08-24 20:06:53 +02:00
Brian Coca
8227b48a6a minor doc fixes 2015-07-28 14:50:01 -04:00
khassen
5f2b365faa Use the common/shared MD5 function. 2015-07-23 13:58:43 -07:00
Brian Coca
92199342cd Merge pull request #1429 from flyinprogrammer/devel
[gce] [gce_net] fix docs; only delete network if fwname is not provided
2015-07-21 18:42:53 -04:00
Brian Coca
82f16f5a45 Merge pull request #1315 from HelenaTian/patch-1
Update gce.py to correctly handle propagated metadata type from a mot…
2015-07-20 20:00:00 -04:00
James Cammarata
baff1bf7f0 Update choices and version_added for new gce.py param service_account_permissions 2015-06-23 13:16:28 -04:00
James Cammarata
5082a022ec Merge branch 'create-gce-instance-with-service-account-scopes' of https://github.com/br0ziliy/ansible-modules-core into br0ziliy-create-gce-instance-with-service-account-scopes 2015-06-23 13:15:27 -04:00
Greg DeKoenigsberg
28a869a030 Updating cloud modules with proper github author information 2015-06-15 14:41:22 -04:00
Alan Scherger
cc221aa1a2 fix docs; only delete network if fwname is not provided 2015-05-27 23:12:34 -05:00
Vasyl Kaigorodov
fa9727eb99 GCE module: added Service Account permissions sanity checks 2015-05-15 16:00:24 +02:00
Vasyl Kaigorodov
f714cc5f7e GCE module: document Service Account permissions parameter usage 2015-05-15 15:34:36 +02:00
Vasyl Kaigorodov
a0b57f3aab GCE module: add posibility to specify Service Account permissions during instance creation 2015-05-15 15:28:28 +02:00
HelenaTian
f620a0ac41 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:)
2015-05-12 20:53:36 -07:00
Toshio Kuratomi
60a66a544d 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.
2015-05-11 12:15:53 -07:00
Pascal Borreli
f29a6ec54d Fixed typos 2015-05-04 12:54:03 +01:00
Brian Coca
3b9756e0cd minor doc fixes 2015-04-08 03:20:28 -04:00
Matt Martz
1e94fc5ab5 Don't use a dict comprehension, be more verbose 2015-04-03 16:35:16 -05:00
Richard Tier
9aa8879f0f added version to docstring 2015-04-01 21:01:00 +01:00
Richard Tier
04c1927300 allow setting header 2015-03-26 23:02:35 +00:00
Robert Marsa
74e94f2712 Added multiple allowed ranges. 2015-03-17 13:49:53 -07:00
Lev Popov
a15cce2d7f Allow to keep instance boot disk after instance deletion in google cloud module 2015-03-04 09:41:03 +01:00