Commit graph

807 commits

Author SHA1 Message Date
James Cammarata
060e2193a1 Merge pull request #6991 from joshuaconner/bugfix_dont_send_wrong_params_to_dockerclient_start
Docker: don't send wrong parameters to client.start()
2014-04-23 15:48:04 -05:00
Richard Hoop
07ad8432ec Ready for pull request 2014-04-23 16:44:49 -04:00
Richard Hoop
5692ae95ab Core complete 2014-04-23 15:26:03 -04:00
James Cammarata
eb090ad4a2 Merge pull request #6599 from dmage/nova_region_name
use region_name in nova_compute
2014-04-23 10:15:57 -05:00
James Cammarata
24cfcd1f88 Merge pull request #6985 from jimi-c/issue_6763_ec2_vpc_params
Ensure params were set in ec2_vpc before accessing them
2014-04-23 10:08:50 -05:00
Richard Hoop
68d45a6484 Started reconfigured 2014-04-23 09:53:12 -04:00
Ted Timmons
b5895712b3 update documentation to include missing option
'list' was added more recently, it was omitted from the documentation.
2014-04-23 08:44:43 -05:00
Richard Hoop
630367ebfc Creation complete 2014-04-22 17:12:23 -04:00
Richard Hoop
3e75e504e0 More config checks and clean up for vm_config settings 2014-04-22 16:20:04 -04:00
Bruce Pennypacker
2be8feebce Changed behavior of deregister. If an instance is not found in the ELB then simply return 'changed=false'. Otherwise always remove the instance from the ELB no matter what state its currently in. 2014-04-22 18:44:41 +00:00
Mike Buzzetti
4cb41de987 Updated and corrected example section 2014-04-22 09:27:26 -04:00
Michael Heca
9ad6511be7 module docker - add docker version comment
Default docker version 0.9.1 from Ubuntu 14.04 LTS don't report APIVersion.
2014-04-22 12:21:51 +02:00
Mike Buzzetti
b2c5106833 Adding support for purging subnets 2014-04-21 21:42:05 -04:00
Richard Hoop
06c64785fb Large cleanups. Reintegrating all modules together for a guest 2014-04-21 16:38:31 -04:00
CaptTofu
2990db728a Small bug - 'acts' should be 'facts' 2014-04-21 08:06:00 -07:00
Bruce Pennypacker
b57887bafd Fix for https://github.com/ansible/ansible/issues/7054 - when renaming an instance and waiting for the change to occur, force result.id to the name of the new instance so the subsequent call to get_current_resource succeeds. 2014-04-18 17:56:11 +00:00
Michael Heca
4271613aa5 module docker_image - default tag latest
Fix constant rebuild of image if no tag specified.
2014-04-18 16:14:12 +02:00
Mike Buzzetti
5dada9403e Adds support for VPC subnets to ELB 2014-04-18 09:59:35 -04:00
Joshua Conner
4defd9a15a docker: exclude 'entrypoint' from comparing 'command' param with containers
The JSON the Docker API returns includes the container's ENTRYPOINT value (if it has one) with the 'Command' value. So instead of checking if `container['Command'] == module.params['command']`, we just check that `container['Command'].endswith(module.params['command'])` so the entrypoint won't affect a container being properly classified as matching the module params or not.

Also I refactored a super-long `if` statement into some temporary variables - I did it to help me figure out what was going wrong, and then it makes the code more readable so I kept it.
2014-04-17 16:10:53 -07:00
Joshua Conner
10171dc42b docker: send 1.10 params if docker-py is new enough version 2014-04-17 16:05:50 -07:00
James Cammarata
1ef0402f03 Make sure a default allow out rule exists if no other egress rules do
Fixes #7027
2014-04-17 15:24:18 -05:00
Matt Bray
3948dc2d1d docker.client.APIError has moved to docker.errors.APIError
see 18d4db09ec
2014-04-16 23:42:56 +01:00
James Cammarata
a37a84243b Check resource_tags value before using it in ec2_vpc
Fixes #7024
2014-04-16 12:21:32 -05:00
evanccopengeo
ac64f3c8cf cleaning up the code a bit more 2014-04-15 18:16:34 -04:00
evanccopengeo
88b30a74d2 fixing bug where if both private_ip and assign_public_p are set ansible fails out 2014-04-15 17:55:26 -04:00
Joshua Conner
0ef288dcc8 Docker: don't send wrong parameters to client.start()
As part of being updated for the 1.10 API, a couple of parameters were passed to the docker.client.start() command that it doesn't accept. This caused the module to error out if it tried to start any Docker containers. This removes those parameters so the module works again.
2014-04-14 15:05:42 -07:00
James Cammarata
46ea3155c6 Ensure params were set in ec2_vpc before accessing them
Fixes #6763
2014-04-14 10:58:07 -05:00
Michael DeHaan
bc2b4174a5 Merge pull request #6956 from mattjbray/docker-1-10-volumes-from-dns
docker: from API 1.10 dns and volumes_from should be passed to start()
2014-04-14 11:29:10 -04:00
Michael J. Schultz
db92301b00 cloud/elasticache: Ensure self.data is iterable
- self.data['SecurityGroups'] can return None causing traceback, if that
  is the case fallback to an empty list
2014-04-11 18:23:53 -05:00
Matt Bray
71b5a11735 docker: from API 1.10 dns and volumes_from should be passed to start() 2014-04-11 17:08:55 +01:00
Eugene Brevdo
8e32f54223 VPC security group membership fix for boto.
* facts now provides a list of existing vpc security group memberships
* adding a comma separated list of sg-* tags properly modifies membership
2014-04-09 13:32:47 -07:00
Will Thames
e7b275483c Use common code for ec2_elb and ec2_elb_lb
Uses the new get_aws_connection_info
and connect_to_aws common methods to reuse code

Now complains if region is not set in one of the
three possible methods

Also moved over to common documentation code so
this is actually based on #6913
2014-04-09 22:47:51 +10:00
willthames
509561f658 Moved AWS modules over to common module fragments
Created common module doc fragment, and applied to all
modules that use ec2_connect or connect_to_aws as
they definitely share the common doc fragments
2014-04-09 21:19:12 +10:00
James Tanner
7c9243eacf Fix version added for new parameters in quantum modules 2014-04-08 10:32:53 -04:00
James Tanner
db90f308ca Fix version_added for login_tenant_name in keystone_user 2014-04-08 10:25:44 -04:00
James Tanner
03f99a57b7 Fix version_added for new params in gce_pd 2014-04-08 10:05:57 -04:00
James Tanner
d37f609e00 Fix version_added for new params in gce_net 2014-04-08 10:03:56 -04:00
James Tanner
387414fe29 Fix version_added for new params in gce_lb 2014-04-08 10:00:30 -04:00
James Tanner
34648426ba Set version_added for snapshot in ec2_vol 2014-04-07 23:10:24 -04:00
Michael DeHaan
dfa8aef408 Merge pull request #6850 from atlashealth/ec2_set_ebs_optimized
ec2: added ability to set EBS optimized instances
2014-04-07 15:57:34 -04:00
James Tanner
b2701d0d76 Fixes #6780 Update version_added for source_dest_check in ec2 module 2014-04-07 12:44:34 -04:00
James Cammarata
085d9aee72 Merge branch 'rax-clb-nodes-nodeid' of https://github.com/sivel/ansible into sivel-rax-clb-nodes-nodeid 2014-04-07 07:40:05 -05:00
Matt Martz
8a98773089 Simplify node matching 2014-04-06 19:17:13 -05:00
Atlas Health
97a7df7644 moved ebs_optimized param out of main request hash 2014-04-06 15:35:22 -07:00
Michael DeHaan
4d2b7d6341 Merge pull request #6864 from sivel/rax-add-shared-mod-docs
Shared module docs for remaining rax modules
2014-04-05 15:16:11 -04:00
Matt Martz
55a26fa9ed Shared module docs for remaining rax modules 2014-04-04 13:02:49 -05:00
Matt Martz
e821770505 Allow respecification of a node without requiring node_id 2014-04-04 12:41:57 -05:00
Ted Timmons
d544eb3e3b cloudformation's disable_rollback must be a bool
passing "yes" to boto causes severe problems.
2014-04-04 08:00:56 -07:00
Michael DeHaan
2518ec2b86 Merge pull request #6849 from atlashealth/ec2_snapshot_fixed_type_issue
ec2_snapshot: fix for "unknown type number requested for wait_timeout"
2014-04-03 18:01:22 -04:00
Matt Martz
37f096a6bb rax modules improvements
* Catch issues with invalid regions
* Ensure we send string only data as meta values in the rax module
* Add public_key/lookup example for rax_keypair
* Clean up import statements
2014-04-03 17:16:24 -04:00
Matt Martz
7b5f89ec7c Use PluginLoader for module docs fragments 2014-04-03 16:52:39 -04:00
Matt Martz
bb6f7a267a Add support for shared module documentation fragments 2014-04-03 16:52:39 -04:00
Atlas Health
2657bbcefa ec2: added ability to set EBS optimized instances
added version
2014-04-03 12:38:43 -07:00
Atlas Health
7321e23b31 fixed error related to type being defined as a number 2014-04-03 12:24:05 -07:00
James Tanner
b660062801 Fixes #6454 verify ec2 key fingerprints 2014-04-03 13:53:43 -04:00
Paul Durivage
3763b32f86 Fix issue where a container is created but is not indicating that the state was changed 2014-04-02 18:05:36 -05:00
Michael DeHaan
19437aad0b Merge pull request #6798 from follower/patch-5
Clarify the port value always defaults to 3306
2014-04-02 17:34:33 -04:00
Michael DeHaan
12022233f4 Merge pull request #6770 from lemonlatte/fix_default_uri_of_get_xml
Fix the default url of get_xml function.
2014-04-02 17:23:22 -04:00
James Cammarata
ba4838cde5 Adding wait/wait_timeout parameters to the ec2_key module
Fixes #6455
2014-04-01 22:14:35 -05:00
jctanner
6a1dcca4be Merge pull request #6805 from sivel/env-interpreter-fix
Fix interpreter lines in a couple of modules
2014-04-01 15:03:20 -04:00
Matt Martz
b4de76373a Use /usr/bin/python instead of /usr/bin/env python 2014-04-01 13:54:37 -05:00
follower
4be010b09b Clarify the port value always defaults to 3306
While the [boto docs](https://github.com/boto/boto/blob/develop/boto/rds/__init__.py#L253) make it seem like the default value of `port` is changed depending on the engine chosen, AFAICT from looking at the code the default value is never changed from 3306.

I think the docs are intended to be read as "the default value used by <engine> is <port> so you should change `port` to that value".

If you don't specify the port value and chose the database engine as PostgreSQL you'll end up with a PostgreSQL instance running on port 3306.
2014-04-02 02:25:14 +13:00
jjshoe
2387f044e4 module_retention isn't defined anywhere, including the help. 2014-04-01 07:49:51 -05:00
follower
618554ad63 Make vpc_security_group docs more accurate
Without the `subnet` parameter supplied there's an error `msg: Parameter vpc_security_groups invalid for create command`. (This might be a bug?)

If the VPC security group name rather than ID is supplied there's an error: `msg: Invalid security group , groupId= <some group name>, groupName=.` (Accepting a group name might be a feature enhancement.)

In my case I set the subnet as `default` and used `register` to get the result of the security group creation section and just referred to its `group_id` property.
2014-04-02 01:06:45 +13:00
Jim Yeh
48dc27ea74 Fix the default url of get_xml function.
* This enable a user to configure uri in get_xml function
2014-03-31 11:05:31 +08:00
Matt Way
034ac93ca2 don't parse empty stream chunks 2014-03-30 15:27:29 -04:00
James Laska
f96618c967 Use proper YAML quotes to fix webdocs 2014-03-30 14:26:18 -04:00
James Cammarata
6e809c2be3 Removing wait loop around initial state check during registration
Also fixed a bug in which the state parameter was marked as a 'bool'
type, which was breaking execution of the module.

Fixes #6543
2014-03-29 23:47:11 -05:00
James Laska
6c8d8a746f Fix YAML docstring that broke webdocs 2014-03-29 19:15:42 -04:00
Cristian Ciupitu
d89d2432fd Bugfix for gc_storage and s3
Make keysum return None if not key_check (this case wasn't covered).
2014-03-28 22:47:46 +02:00
Michael DeHaan
e6ab2d83b8 Merge pull request #6081 from alexanderpopov1/ec2_vpc-subnet-tagging
Added support for tagging subnets in ec2_vpc module
2014-03-28 15:27:59 -04:00
Michael DeHaan
5b5ab78183 Add version_added to docs. 2014-03-28 13:51:22 -04:00
Michael DeHaan
53ee1ea27c Merge branch 'aws-ec2-egress-rules' of git://github.com/mmoya/ansible into devel 2014-03-28 13:50:58 -04:00
Michael DeHaan
8285ac5b31 Merge branch 'ec2_vpc-multiple-vpcs-support' of git://github.com/alexanderpopov1/ansible into devel
Conflicts:
	library/cloud/ec2_vpc
2014-03-28 12:51:40 -04:00
Michael DeHaan
7db784687d Merge pull request #6486 from discordianfish/docker-module-add-running
Rename present to running, add new present state
2014-03-28 11:50:21 -04:00
Michael DeHaan
0e8c7b1c03 Scrub choices=BOOLEANS from remaining core module references. Correct form in argument_spec is type='dict'. 2014-03-28 11:41:35 -04:00
Michael DeHaan
3312099e70 Merge branch 'ec2_snapshot' of git://github.com/hkariti/ansible into devel 2014-03-28 11:36:31 -04:00
Michael DeHaan
7519e33787 Merge pull request #6730 from sivel/rax-cbs-new
New modules: rax_cbs and rax_cbs_attachments
2014-03-28 11:28:46 -04:00
Michael DeHaan
344bbf3eea Merge pull request #6419 from willthames/aws-autoscaling-with-token-and-profile
Improvements to ec2 autoscaling modules
2014-03-28 11:26:53 -04:00
Michael DeHaan
e21f61d604 Merge pull request #6616 from willthames/ec2_vol_allow_delete
Allow state=absent for ec2_vol
2014-03-28 11:24:37 -04:00
Joshua Conner
7a6c60b437 docker: use type instead of manually casting strings to lists 2014-03-28 11:19:48 -04:00
Joshua Conner
7bba229838 docker bugfixes: trim whitespace around list param elements, handle list params being coerced to int or long type 2014-03-28 11:19:13 -04:00
Cristian Ciupitu
1eaf85b89f Micro-optimization: replace s.find(x)!=-1 with x in s
timeit shows a speedup of ~3x on Python 2.7.5 x86_64.
It also makes the code a bit shorter.
2014-03-27 20:35:20 +02:00
Matt Martz
bb86443528 Implement recommendations from #4864 2014-03-27 12:59:08 -05:00
Christopher H. Laco
972a27b14e Add Rackspace Cloud Block Storage modules
- Add rax_cbs to create/delete cloud block storage volumes
- Add rax_cbs_attachments to attach/detach volumes from servers
2014-03-26 14:42:22 -05:00
Matt Martz
e093b216ff Support arbitrary extra args in rax module
Add extra_create_args and extra_client_args to rax module to support passing
advanced configuration options to client instantiation and server create calls.
2014-03-26 12:50:44 -05:00
Hagai
436b59252c Added wait_timeout option 2014-03-26 16:18:25 +02:00
Hagai
c900254ed0 ec2_snapshot: Add wait' and snapshot_tags' parameters, return more
info on success
2014-03-26 16:18:25 +02:00
Ian Pointer
bebb11afeb Adding type int for count (in line with other cloud modules) 2014-03-23 13:51:54 -04:00
willthames
c0ac615a07 Allow state=absent for ec2_vol
Add methods to the module to make it more readable and allow reuse
2014-03-21 22:10:55 +10:00
Maykel Moya
6a92d48b0f ec2_group: Document group_desc rule param 2014-03-21 08:35:25 +01:00
Michael DeHaan
c729bf209c Update documentation YAML syntax. 2014-03-20 13:22:19 -04:00
Maykel Moya
a429ff26dc ec2_group: Add documentation for rules_egress 2014-03-20 17:24:22 +01:00
Maykel Moya
b642e39e67 ec2_group: rules are not a required task argument 2014-03-20 17:24:22 +01:00
Maykel Moya
3156df9931 ec2_group: Request a fresh group object after creation
When a group is created, an egress_rule ALLOW ALL to 0.0.0.0/0 is added
automatically but it's not reflected in the object returned by the AWS API
call. After creation we re-read the group for getting an updated object.
2014-03-20 17:24:22 +01:00
Maykel Moya
649fcd3e1c ec2_group: Auto create missing groups referenced in rules
Suppose a pair of groups, A and B, depending on each other. One solution
for breaking the circular dependency at playbook level:

    - declare group A without dependencies
    - declare group B depending on A
    - declare group A depending on B

This patch breaks the dependency at module level. Whenever a depended-on
group is missing it's first created. This approach requires only two tasks:

    - declare group A depending on B (group B will be auto created)
    - declare group B depending on A

When creating a group EC2 requires you to pass the group description. In
order to fullfil this, rules now accept the `group_desc` param. Note
that group description can't be changed once the group is created so
it's nice to keep descriptions in sync.

Concrete example:

- ec2_group:
    name: mysql-client
    description: MySQL Client
    rules_egress:
      - proto: tcp
        from_port: 3306
        to_port: 3306
        group_name: mysql-server
        group_desc: MySQL Server

- ec2_group:
    name: mysql-server
    description: MySQL Server
    rules:
      - proto: tcp
        from_port: 3306
        to_port: 3306
        group_name: mysql-client
2014-03-20 17:24:17 +01:00
Maykel Moya
77d7165dde ec2_group: Deduplicate rule parsing/validation code 2014-03-20 16:19:35 +01:00
Maykel Moya
f97243d6ed ec2_group: Add support for handling egress rules 2014-03-20 15:50:08 +01:00
jjshoe
1f980b6880 assign_public_ip was actually added in 1.5
Checked 1.4.5 and this option doesn't exist. Will check/update/pull docs next.
2014-03-20 09:21:10 -05:00
Oleg Bulatov
3edd3862df Respect region_name in nova_compute
Signed-off-by: Oleg Bulatov <oleg@bulatov.me>
2014-03-20 17:07:49 +04:00