Commit graph

11677 commits

Author SHA1 Message Date
Michael DeHaan
24f6f656cc Merge branch 'bug8392' of git://github.com/gnosek/ansible into devel 2014-08-04 10:22:29 -04:00
James Laska
d4a78dc951 Include unicode and var_precedence tests in 'all' target 2014-08-04 09:50:30 -04:00
Michael DeHaan
c5f92597e4 Add version_added attribute for regexp parameter. 2014-08-04 07:51:29 -04:00
Will Thames
cc59760ac9 Improved handling of already terminated instances
It is possible to create an instance, terminate the instance and then
attempt to recreate the instance with the same parameters. In this case
`ec2.run_instances` returns a reservation list containing the instance ids
but the logic gets stuck waiting for the instance to exist in the call to
`ec2.get_all_instances`, even if wait is no).
2014-08-04 11:58:57 +10:00
Monty Taylor
f3357099a7 Pass region_name to nova_keypair
Again, on things with regions, when we're configuring it, we should
actually pass it in to the compute constructor.
2014-08-03 10:43:39 -07:00
Monty Taylor
b81a37ad9b Rename nova filters to include and exclude
jeblair says: "having 'flavor_filter' be inclusive, and 'image_filter'
be exclusive is kind of mind blowing" and I agree. Let's be more
explicit.
2014-08-03 09:21:14 -07:00
Monty Taylor
38beae3b19 Add nova config drive support
Config drive can be enabled on nova by passing config_drive=True.
That's a pretty easy feature to support.
2014-08-03 09:05:45 -07:00
ebargtuo
76aae48ea6 Fix a typo in gem module documentation 2014-08-03 14:52:24 +02:00
Monty Taylor
a05804bf8d Update the nova inventory plugin with new ip code
The provisioning module knows more about how nova deals with IP
addresses now. Ensure that the inventory module is similarly as smart
by separating out the logic into the openstack/module_utils.
2014-08-02 22:31:27 -07:00
Monty Taylor
a12086f1bf Update existing nova instances with current ip
During the state check, check IP address information. This gets us
two things. The most obvious is that for direct IP management, a
change to the config will reflect in the config of the instance. But
also, if we succeed in creating the instance but fail in adding an IP,
this should let us re-run and arrive in the state we were expecting.
2014-08-02 21:13:17 -07:00
Monty Taylor
c6975552d7 Cleaned up nova_compute documentation
Added version_added tags as well as a few more examples.
2014-08-02 20:45:35 -07:00
Monty Taylor
b80be42ed9 Add ability to filter on image and flavor names
The fun part about having multiple vendors providing the same cloud
is that while their APIs are the same, what they do with their metadata
tends to be ... fun. So in order to be able to express sanely what you
want without needing to stick tons of unreadable uuids in your config,
it turns out what sometimes you need to further filter image and flavor
names. Specific examples are (deprecated) images in HP Cloud and the
Standard and Performance flavors on Rackspace.
2014-08-02 20:31:31 -07:00
Monty Taylor
65adb6465b Specify nova image and flavor by name
Putting uuid and numberic identifies in playbooks is fragile, especially
with cloud providers who change them out from under you. Asking for
Ubuntu 14.04 is consistent, the UUID associated with that is not. Add
mutually exclusive parameters to allow for specifying images by name and
flavors by RAM amount.
2014-08-02 18:51:27 -07:00
Monty Taylor
3fe1083192 Use mutually exclusive on nova floating ip params
ansible knows how to deal with mutually exclusive parameters, so
instead of coding that ourselves, use it.
2014-08-02 18:26:23 -07:00
Monty Taylor
d17a1b5c19 Add common auth handling across openstack modules
Taking a page out of the ec2 config, make sure that all of the
OpenStack modules handle the inbound auth config in the same way.
The one outlier is keystone wrt auth_url.
2014-08-02 17:39:19 -07:00
Monty Taylor
ac420fd483 Consume standard OpenStack environment settings
The OpenStack client utilities consume a set of input environment
variables for things like username and auth_url, so it's very
common for OpenStack users to have such settings set in their
environment. Indeed, things like devstack also output a shell file
to be sourced to set them. Although in a playbook it's entirely
expected that variables should be used to pass in system settings
like api passwords, for ad-hoc command line usage, needing to pass
in five parameters which are almost certainly in the environment
already reduces the utility.

Grab the environment variables and inject them as default. Special care
is taken to ensure that in the case where the values are not found, the
behavior of which parameters are required is not altered.
2014-08-02 17:39:19 -07:00
Monty Taylor
2611246b89 Cleanup in nova after a failed floating ip
There is a potential leak of resources if there is somehow a failure
adding a floating ip to a server. Clean up after ourselves.
2014-08-02 17:39:19 -07:00
Monty Taylor
6045923cab Find IPs on OpenStack clouds without floating-ips
The floating-ip extension, while pretty ubiquitous, is not a
foregone conclusion. Specifically, Rackspace, while also
served by the rax module, is a valid OpenStack cloud and can
be interacted with directly via nova interfaces.

Add support for determining public and private IPs for
OpenStack clouds that don't use floating ips by reading
the public and private keys from the addresses dict.
2014-08-02 17:39:15 -07:00
Monty Taylor
1e0e7a6b28 Add support for nova availability zones
If a cloud has availability zone support, it's possible to specify
an availability zone via the nova client. Add that as a config param.
2014-08-02 17:15:15 -07:00
Monty Taylor
8938222029 Pass through nova region name
If the region name is specified in the config, we need to pass it
in to the nova client constructor. Since key_name is similarly optional,
go ahead and handle both parameters the same.
2014-08-02 17:15:15 -07:00
Monty Taylor
10a50b4a61 Split nova floating-ip pool logic
The desires around getting a floating ip associated with a pool and
getting a floating ip not associated with a pool is just different
enough that following it as one set of nested ifs is tricky. Split
the function into two, one for the pool and one for the non-pool logic.
2014-08-02 17:15:15 -07:00
CaptTofu
6da266f64c Added floating IP functionality to nova_compute 2014-08-02 17:15:15 -07:00
Jonathan Mainguy
c0966eee7c Fixes issue #8339 where Scientific Linux incorrectly tries to use FedoraStrategy of hostnamectl 2014-08-02 15:38:52 -04:00
Michael DeHaan
b9a5242f03 Merge pull request #8405 from wenottingham/patch-2
Update version.
2014-08-02 10:33:12 -04:00
Michael DeHaan
d49f8c28df Merge pull request #8400 from nicocesar/devel
"allow_no_value=True" for ini_file module
2014-08-02 10:24:56 -04:00
Michael DeHaan
a88dc7a26a Merge pull request #8398 from wrosario/integration_mysql_variables
Adding test Coverage for mysql_variable module
2014-08-02 10:24:16 -04:00
Michael DeHaan
78ee3b4a59 Merge pull request #8397 from lukesneeringer/gce-envvars
Add support for environment variables in GCE module.
2014-08-02 10:23:35 -04:00
Bill Nottingham
6e00f60427 Update version. 2014-08-01 19:43:54 -04:00
Luke Sneeringer
f706eba4a5 Envirionment variable support in GCE inventory plugin. 2014-08-01 16:12:57 -05:00
Michael DeHaan
3e45791d05 Update our search code for the doc site. 2014-08-01 17:10:39 -04:00
Nico Cesar
cbdc9f1153 "allow_no_value=True" for ini_file module so /etc/my.cnf can be read without a problem 2014-08-01 16:04:35 -04:00
Luke Sneeringer
a4fce4818e Add support for environment variables in GCE module. 2014-08-01 11:44:58 -05:00
Wayne Rosario
2957a8de44 Adding test Coverage for mysql_variable module
Use mysql_variable to query, set and update variables.
Assert using user and password to query, set and update  variables.
Assert using single quotes, double quotes and no quotes  when using variables
2014-08-01 12:15:05 -04:00
Michael DeHaan
27a73f2c11 Update vault docs to indicate the executable script option is part of Ansible 1.7. 2014-08-01 10:30:43 -04:00
Grzegorz Nosek
7f33580eba Fix exponential regex performance issue
filter_leading_non_json_lines effectively does

re.match(".*\w+=\w+.*", line)

for every line of output. This has abysmal performance in case of large
Base64-encoded data (which ultimately does not match the regex but does
match the .*\w+= part) as returned e.g. by the template module (diffs).

Replacing the match with

re.search("\w=\w", line)

drops the complexity back to linear, and actually usable with large
diffs from the template module (a 150 KB Base64 diff kept Ansible
spinning at 100% cpu for minutes).

Also, check the easy cases (line.startswith) first while we're here.

Closes: #8932
2014-08-01 14:46:00 +02:00
Michael DeHaan
c93b89fa63 Merge pull request #8385 from lorin/doc-ec2-states
ec2 module: document valid states
2014-07-31 17:49:58 -04:00
Lorin Hochstein
42df1f890a ec2 module: document valid states 2014-07-31 15:29:52 -06:00
James Cammarata
22f3f2b74a Merge pull request #8174 from altruism/devel
Make ec2_group module not just fail
2014-07-31 15:02:30 -05:00
James Cammarata
745b28072a Check for the numeric "all" value (-1) for the rule protocol
Fixes #7832
2014-07-31 14:01:44 -05:00
James Cammarata
1a90442f9b Merge branch 'ingmar-ec2inv-rdstoggle' into devel 2014-07-31 13:39:13 -05:00
James Cammarata
0ae87cb725 Merge branch 'ec2inv-rdstoggle' of https://github.com/ingmar/ansible into ingmar-ec2inv-rdstoggle
Conflicts:
	plugins/inventory/ec2.py
2014-07-31 13:38:54 -05:00
James Cammarata
c0455dc7d0 Merge branch 'cchurch-ec2_nested_groups' into devel 2014-07-31 13:08:54 -05:00
James Cammarata
5764015876 Merge branch 'ec2_nested_groups' of https://github.com/cchurch/ansible into cchurch-ec2_nested_groups
Conflicts:
	plugins/inventory/ec2.py
2014-07-31 13:07:31 -05:00
Michael DeHaan
8ad296a6f2 Simply docs by providing the powershell setup script instead. Thanks Trond!!! 2014-07-31 13:42:12 -04:00
James Cammarata
c8d67912be Merge branch 'debfx-patch-1' into devel 2014-07-31 11:54:36 -05:00
James Cammarata
9c1a89ff4e Merge branch 'patch-1' of https://github.com/debfx/ansible into debfx-patch-1 2014-07-31 11:41:21 -05:00
James Cammarata
00ce87484b Merge pull request #8363 from greenmoss/devel
Fix Docker image name parsing
2014-07-31 11:27:19 -05:00
James Cammarata
ccc4b00b40 Merge pull request #8045 from trondhindenes/script_configureWinRMforAnsible
Added script for configuring winrm for Ansible
2014-07-31 11:21:21 -05:00
James Cammarata
74068bc50f Merge pull request #8189 from bcoca/vmware_inv_env
vmware inventory fixes and features
2014-07-31 11:16:52 -05:00
James Cammarata
ac67351d0d Merge pull request #8366 from jlaska/azure_fixes
Several azure fixes
2014-07-30 15:31:55 -05:00