Commit Graph

2879 Commits (f5658f4e5048ae6f2cf1d8eb434be3602fc6bb3a)

Author SHA1 Message Date
Monty Taylor 9914626ce2 Add a few lines about testing (#5662) 9 years ago
Dag Wieers f08ba8c7d6 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
9 years ago
Sam Doran a257f9cc9c Examples syntax batch6 (#5623)
* Change example syntax on os_auth module

* Change example syntax on os_client_config module

* Change example syntax on os_image_facts module

* Change example syntax on os_networks_facts module

* Change example syntax on os_nova_flavor module

* Change example syntax on os_object module

* Change example syntax on os_server module

* Change example syntax on os_subnet_facts module

* Change example syntax on rax_files module

* Change example syntax on rax_files_objects module

* Change example syntax on mysql_db module

* Change example syntax on file module

* Change example syntax on uri module

* Change example syntax on cl_bond module

* Change example syntax on cl_bridge module

* Change example syntax on cl_img_install module

* Change example syntax on cl_interface module

* Change example syntax on cl_license module

* Change example syntax on cl_ports module

* Remove trailing colon
9 years ago
Jesse Keating bb97885f91 Do not require password when deleting os_user (#5601)
I broke backwards compat with the addition to define when a password
should be updated. It was requiring that a password value be passed when
deleting a user, which seems silly.

This moves the argument logic out of the argument spec and into when it
would be needed, when state is present.
9 years ago
Luc Charpentier a0545dc9f8 error in docker_container example (#5631) 9 years ago
Abdul Anshad A cf76fce0ae fixes issue #5517 (#5519) 9 years ago
Sam Doran 52d376c88e 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
9 years ago
Ryan Brown f35be48335 Support suspending scaling processes in `ec2_asg` module (#5562)
* Add support for suspending scaling processes
Ref: http://docs.aws.amazon.com/autoscaling/latest/userguide/as-suspend-resume-processes.html

* Set suspend_processes version_added to 2.3
9 years ago
Ryan Brown 7828b1adc1 Fixes: #4516 add placement_group argument for ec2_asg module (#5506) 9 years ago
einarc 8d1fe3b444 Avoid `TypeError` when desired_capacity is not provided to `ec2_asg` module (#5501)
Moving the "check if min_size/max_size/desired_capacity..." code to execute BEFORE the desired_capacity code is used in the following operation:
num_new_inst_needed = desired_capacity - len(new_instances)

Otherwise the following exception occurs when desired_capacity is not specified and you're replacing instances:
    num_new_inst_needed = desired_capacity - len(new_instances)
TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'

Stack Trace:

An exception occurred during task execution. The full traceback is:
Traceback (most recent call last):
  File "/var/lib/awx/.ansible/tmp/ansible-tmp-1478229985.74-62334493713074/ec2_asg", line 3044, in <module>
    main()
  File "/var/lib/awx/.ansible/tmp/ansible-tmp-1478229985.74-62334493713074/ec2_asg", line 3038, in main
    replace_changed, asg_properties=replace(connection, module)
  File "/var/lib/awx/.ansible/tmp/ansible-tmp-1478229985.74-62334493713074/ec2_asg", line 2778, in replace
    num_new_inst_needed = desired_capacity - len(new_instances)
TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'

fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "invocation": {"module_name": "ec2_asg"}, "module_stderr": "Traceback (most recent call last):\n  File \"/var/lib/awx/.ansible/tmp/ansible-tmp-1478229985.74-62334493713074/ec2_asg\", line 3044, in <module>\n    main()\n  File \"/var/lib/awx/.ansible/tmp/ansible-tmp-1478229985.74-62334493713074/ec2_asg\", line 3038, in main\n    replace_changed, asg_properties=replace(connection, module)\n  File \"/var/lib/awx/.ansible/tmp/ansible-tmp-1478229985.74-62334493713074/ec2_asg\", line 2778, in replace\n    num_new_inst_needed = desired_capacity - len(new_instances)\nTypeError: unsupported operand type(s) for -: 'NoneType' and 'int'\n", "module_stdout": "", "msg": "MODULE FAILURE", "parsed": false}
	to retry, use: --limit @
9 years ago
Patrick F. Marques afa1750105 Remove duplicated option from examples 9 years ago
Zaius Dr 135c70bdd8 Improve `ec2` module Python3 Support (#5497)
Imported six module from ansible module_utils for backwards compatibility.
9 years ago
Lars Van Casteren 00e64def78 Docs update for `os_security_group` (#5531)
The example used equal characters and not colon characters.
9 years ago
Ben Tomasik af645041e5 Set suspend_processes version_added to 2.3 9 years ago
Ben Tomasik f4bd008184 Add support for suspending scaling processes
Ref: http://docs.aws.amazon.com/autoscaling/latest/userguide/as-suspend-resume-processes.html
9 years ago
Andrew Gaffney d52d256196 Fix bare variable references in docs (#5554) 9 years ago
Ryan Brown 801f4f0bf4 Fix `cloudformation` error when stack-rollback fails (#5550)
In cases where a CFN stack could not complete (due to lack of
permissions or similar) but also failed to roll back, the gathering of
stack resources would fail because successfully deleted items in the
rollback would no longer have a `PhysicalResourceId` property.

This PR fixes that by soft-failing when there's no physical ID
associated to a resource.
9 years ago
Ryan S. Brown 4f83b809dc Fix doc examples for `ec2_elb_lb` module
The examples had the listeners as a list item for each param, when they
really need to be their own objects.
9 years ago
Ryan S. Brown 8cbb0dc13e Fail gracefully in `ec2_asg` module when there are no matching launch configurations 9 years ago
jctanner 2de97ac5bd replace type() with isinstance() (#5541)
Replace all use of type() with isintance()

Addresses https://github.com/ansible/ansible/issues/18310
9 years ago
Ryan S. Brown 45588171a8 Fix link in `cloudformation` module docs 9 years ago
Sean Summers aa5124af27 added requires for botocore with RoleARN support
Added a requires for the minimum botocore version required to support RoleARN
9 years ago
Sean Summers f31a71c4cf add role_arn to support Service Role
Add `role_arn` to support [AWS CloudFormation Service Role](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-servicerole.html)
9 years ago
Jason Cormie cbc3aac2f2 Addition of InstanceUUID to facts (#4424)
The Instance UUID(refered to as PersistenceUUID in the API) is a the ID
vcenter uses to idenify VMs.
My use case for this is that I configure Zabbix using ansible and its
vmware module relies on using these to identify VMs.
9 years ago
Yair Fried c953397fde Expose internal_network in os_floating_ip (#5510)
* Expose internal_network in os_floating_ip

Shade project has finally exposed this argument so now this module
matches old quantum_floatingip module's capabilities.

Use "nat_destination" term instead of "internal_network" to match shade
terminology.

* Add (private|internal)_network aliases to os_floating_ip

* Fix typo in os_floating_ip
9 years ago
mickael-ange 1ca20679dd Added aws and ec2 extends_documentation_fragment to cloud/amazon/rds module. (#3951) 9 years ago
Abel Boldú 9d07911b03 Add uplink provider type (#5282) 9 years ago
Eduard Iskandarov d856c67cde Fixes: #4516 add placement_group argument for ec2_asg module 9 years ago
Tom Melendez 94d28fbd6f 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) 9 years ago
Jesse Keating 4db6d47ef8 Add update_password argument to os_user (#5219)
There is a desire to not have this module always result in a change if a
password argument is supplied. The OpenStack API does not return a
password back when we get a user, so we've been assuming that if a
password argument was supplied, we should attempt to change the password
(even if nothing else is changing), and that results in a "changed"
state. Now we will only send along a password change attempt if the user
wants one (the default to match history).

Fixes #5217
9 years ago
Ricardo Carrillo Cruz 872a3822c2 Add rebuild support to os_server_actions (#4289)
Fixes #2714
9 years ago
Jamie Dyer e69e1ca2c8 Make the RDS endpoint available if AWS returns it. Fixes #3865 (#4143) 9 years ago
Brian Coca 859180d013 corrected version added 9 years ago
Brian Coca b8eb9769a3 added logout to docker_login
also cleaned up 'actions' and minor doc issues
9 years ago
Charles Paul 1163b4bb50 add id: back to documentation 9 years ago
John Baublitz 7cfe6df92e 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
9 years ago
Ryan S. Brown 98f6019d86 Remove unused YAML import from cloudformation 9 years ago
Ryan Brown 23da0fc2b8 Support native YAML in CloudFormation module (#5327)
Support the new native YAML format in the CloudFormation API. This means
the existing `template_format` parameter is deprecated. This commit also
adds a warning for the deprecated parameter.
9 years ago
Daniel Andrei Minca ced24b7b03 fix unclear documentation for docker container
the docker container module's `exposed_ports` was slightly ambigous.

Use the official Docker documentation to define what an `exposed port`
is.

Resolves: ansible/ansible-modules-core#5303
Signed-off-by: Daniel Andrei Minca <mandrei17@gmail.com>
9 years ago
Ryan S. Brown cd9e39420b Fix cloudformation module return parameter documentation
Always return stack outputs, even if only an empty dict
9 years ago
tedder d8b015d9c8 Cloudformation module fix unintentional changed=true
- Don't rewrite the result; this is causing 'changed=true' on update
- Move AWSRetry import to top since it's a decorator, and is needed at definition-time
9 years ago
tedder f040d63403 Boto3 rewrite of cloudformation module
- removed star-imports, which wasn't possible in Ansible 1.x
- boto doesn't have any of the modern features (most notably, changesets), so this rewrite goes all-in on boto3.
- tags are updateable, at least in boto3. Fix documentation.
- staying with "ansible yaml to json conversion" because I'm trying to keep this scoped properly. The next PR will have AWS-native yaml support.
- documented the output. Tried to leave it backwards-compatible but the changes to 'events' might break someone's flow. However, the existing data wasn't terribly useful so I don't assume it will hurt.
- split up the code into functions. This should make unit testing possible.
- added forward-facing code: 'six' for iterating, started using AWSRetry, common tag conversion.
- add todo list
- Pass `exception` parameter to fail_json
9 years ago
Ryan S. Brown d018a86f4f Fix `fail_json` invocation in `cloudformation` module 9 years ago
Ricardo Carrillo Cruz 500736d301 Refactor domain/project handling on os_user module (#5212)
The keys returned by user objects for default domain and
default project are respectively default_domain_id and
default_project_id.
We need to gather those IDs in case the user passed names, so we
can then compare with the user object on the needs_update helper
function.
9 years ago
Davis Phillips 2fdd869fd6 vsphere_guest: Set extra config and powerstate after template deploy (#4266)
* Fixes #1381
* Fixes #2971
* Fixes #3056
9 years ago
Michael Scherer 8853f6b6a4 Do not leak the password in log (#5203) 9 years ago
Michael Scherer 9718a58be4 Do not leak api_key or root password in log (#5201) 9 years ago
John R Barker 312f578f93 Bulk spelling improvement to modules-core (#5225)
* Correct spelling mistakes

* Correct more spelling issues

* merge conflict

* Revert typo in parms
9 years ago
Tom Melendez c6d8cb6cab Added libcloud guard for Managed Instance Groups. (#4911) 9 years ago
Tom Melendez 454835622b GCE module examples update. Correct syntax, demonstrate other options and creation of multiple instances. (#5192) 9 years ago