Commit graph

6803 commits

Author SHA1 Message Date
Yannig Perre
eb18767f91 Visit all network class not just direct sub classes.
Fix for https://github.com/ansible/ansible/issues/15446
2016-04-23 07:24:26 -07:00
Toshio Kuratomi
09605ce806 Fix facts for the FieldAttribute list change in 30a38f9 2016-04-22 16:31:53 -07:00
James Cammarata
30a38f94ce Create a special class of list FieldAttribute for splitting on commas
Which we're use on a case-by-case basis if we find people were actually
using comma-separated strings for list values outside of hosts. Support
for doing so is now deprecated and users should instead use the full
YAML syntax for lists of values.

Fixes #15291
2016-04-22 14:21:14 -04:00
Toshio Kuratomi
fcd6d7010d Fixup perms dont rely on privileged user named root (#15482)
* Don't rely on username to check for root privileges

The SSH username isn't a reliable way to check if we've got root privileges on
the remote system (think "toor" on FreeBSD). Because of this check, Ansible
previously tried to use the fallback solutions for granting file access (ACLs,
world-readable files) even on systems where it had root privileges when the
remote username didn't match the literal string "root".

Instead of running checks on the username, just try using `chmod` in any case
and fall back to the previous "non-root" solution when that fails.

* Fail if we are root and changing ownership failed

Since this code is security sensitive we document exactly the expected
permissions of the temporary files once this function has run.  That way
if a flaw is found in one end-result we know more precisely what scenarios
are affected and which are not.
2016-04-22 08:40:34 -07:00
jctanner
76f73dc81f Change the raw module's detection of environment settings. (#15535)
The task_vars datastructure always contains an environment key,
so use the _task.environment property to look for a non-empty
list instead.
2016-04-21 22:58:07 -04:00
chouseknecht
a79e9182e1
Set the name of the user_agent in each mangement client. 2016-04-21 17:51:28 -04:00
Kei Nohguchi
9d5b4fe212 openswitch.py: Use new ops.dc declarative Config(DC) module (#15489)
Instead of using the old OpenSwitch runconfig, we'll use
Mir's new ops.dc declarative config for the DC interaction
with OpenSwitch.  This gives us the clearer separation between
ansible and the OpenSwitch, as well as the performance
improvement done inside the ops.dc module itself.

Squashed the original Mir's change into single commit.

Tested-by: Kei Nohguchi <kei@nohguchi.com>
2016-04-21 17:23:43 -04:00
Brian Coca
a76531ca3a submodule ref update 2016-04-21 16:30:27 -04:00
chouseknecht
af5e4abf66
Rename azure inventory script. Fix bug preventing AD user login via environment vars. 2016-04-21 14:34:08 -04:00
James Cammarata
772d659929 Updating CHANGELOG and extras submodule pointer for new kubernetes module 2016-04-21 13:23:32 -04:00
Toshio Kuratomi
bac47f6281 Update submodule refs 2016-04-21 07:42:08 -07:00
Chris Houseknecht
ba74f5f3e5 Adding docker doc frag (#15494) 2016-04-20 13:56:19 -04:00
Brian Coca
a5d79a39d5 Ensure action plugins remove tmp dirs created (#15501)
fixes #14917
2016-04-20 13:39:12 -04:00
Matt Davis
67e6bd18e4 Merge pull request #15488 from jctanner/AMC-32
WARN if the play or the task attempts to pass environment to the raw module
2016-04-20 10:03:17 -07:00
Toshio Kuratomi
6520312a65 Update submodule refs 2016-04-20 09:17:19 -07:00
Brian Coca
b1c3d2aacb removed unused section regex, corrected group one 2016-04-20 11:52:50 -04:00
Toshio Kuratomi
5fc90058e4 Make ziploader handle python packages as well as python modules 2016-04-19 20:10:51 -07:00
James Tanner
095ec760ac Provide a warning if the play or the task attempts to pass environment to the raw module.
Addresses ansible-modules-core/issues/32
2016-04-19 22:41:46 -04:00
James Cammarata
f32592f092 Merge pull request #14400 from d3matt/FIX/paramiko_lecture
paramiko transport appears to hang if it gets a sudo lecture
2016-04-19 13:31:17 -04:00
Toshio Kuratomi
ee18af48ef Merge pull request #15385 from bjne/mysql_unix_socket
mysql_*: enable mysql connection via unix socket
2016-04-19 10:09:12 -07:00
James Cammarata
a0dea1ac35 Fix var precedence bug introduced in ff9f5d7d
Fixes #14067
2016-04-19 12:40:31 -04:00
Toshio Kuratomi
7b5d2d3bec Make sure that args are interpreted as utf8 on python3 2016-04-19 09:37:17 -07:00
Toshio Kuratomi
e386a51cf8 Trnasform file name to bytes before opening it to avoid unicode errors if python tries to encode it implicitly 2016-04-19 08:33:01 -07:00
Toshio Kuratomi
0a31c24938 Merge pull request #15419 from nitzmahone/module_debug_arg_override
add _load_params debug overrides for module args/file passed on cmdline
2016-04-19 07:49:05 -07:00
Toshio Kuratomi
596f6e0894 Update core submodule ref again for another git fix 2016-04-19 07:44:26 -07:00
Toshio Kuratomi
0e63f09d5a Fix for apt module test failures 2016-04-19 07:36:46 -07:00
Brian Coca
33761efd19 Merge pull request #15417 from bcoca/copy_vaulted
Copy vaulted
2016-04-19 10:22:30 -04:00
Toshio Kuratomi
c8cb5e1042 Update submodule refs 2016-04-19 07:01:50 -07:00
Matt Davis
822f904aa6 Merge pull request #14813 from mattclay/lxd-plugin
Add lxd connection plugin.
2016-04-19 02:06:31 -07:00
James Cammarata
0e2f1b423d Merge pull request #15455 from chemikadze/devel
Fix duplicate host with different uuid created after add_host
2016-04-19 02:50:27 -04:00
James Cammarata
6eefc11c39 Make the loop variable (item by default) settable per task
Required for include+with* tasks which may include files that also
have tasks containing a with* loop.

Fixes #12736
2016-04-19 01:42:40 -04:00
Toshio Kuratomi
d2a7be142e A couple fixes for ziploader:
* Move zipcache temp dir creation into the locked section otherwise it
  races with other workers.
* Catch IOError and turn it into an AnsibleError.  IOErrors can hang
  multiprocessng.
2016-04-18 11:51:45 -07:00
nitzmahone
5b336832af add _load_params debug overrides for module args/file passed on cmdline
Updated python module wrapper explode method to drop 'args' file next to module.
Both execute() and excommunicate() debug methods now pass the module args via file to enable debuggers that are picky about stdin.
Updated unit tests to use a context manager for masking/restoring default streams and argv.
2016-04-18 11:06:46 -07:00
James Cammarata
ed35e8bce2 Don't override the http status code when successful in urls.py 2016-04-18 13:20:24 -04:00
Toshio Kuratomi
7833b5bec4 Merge pull request #15420 from robinro/distribution_version_tests
Distribution version tests
2016-04-18 10:05:55 -07:00
Chris Houseknecht
f28a0ca4bb Update Azure doc fragment (#15450)
* Add default attribute to all option doc strings.

* Fix fragment file name.
2016-04-18 11:05:30 -04:00
Brian Coca
621b98668f fixed boto.ec2 import
alternative to #15224 and fixes #11755
2016-04-18 10:34:44 -04:00
Nikolay Sokolov
d8867d7ce3 Fix duplicate host with different uuid created after add_host
If add_host is performed with hostname existing in inventory, but
not yet accessed and put in inventory cache, additional host with
same hostname and different uuid is created, causing patterns to
misbehave.
2016-04-18 00:10:09 -07:00
Ritesh Khadgaray
3608829b1b vmware.py: allow for better search functionality (#15053)
- search entity by path
 - search vm based on folder
 - search for a vm based on given id ( uuid/name/dns_name/ip/inventory_path)
 - search for a cluster by name, in a given datacenter (optionally)
 - search for objects of a given type in a folder

Note: instance uuid is unique to a VM
2016-04-17 19:10:24 +02:00
chouseknecht
ea07afe67b
Add missing AD user params. 2016-04-17 01:43:39 -04:00
Chris Houseknecht
9e6988c7b5 Merge pull request #15359 from chouseknecht/azure_common
Adding common utils module for new Azure modules.
2016-04-16 04:17:56 -04:00
chouseknecht
98d8da1e67 Adding Azure module doc fragments. 2016-04-16 01:19:59 -04:00
chouseknecht
47620737fb Adding common utils module for new Azure modules. 2016-04-16 01:13:19 -04:00
Matt Clay
5fc76df18b Add lxd connection plugin. 2016-04-15 19:10:57 -07:00
Matt Martz
a985bf6a31 Don't pass context to urlopen, instead add it to the handlers. Fixes https://github.com/ansible/ansible-modules-core/issues/3437 2016-04-15 16:10:54 -05:00
Robin Roth
37188ea336 cleanup tests
* use nose test generator
* more comments
* move facts import inside the skipped function, fix python3 warning
2016-04-15 17:14:14 +02:00
Robin Roth
2b104fe6ad fix tests for SLES and CoreOS
* include #15230
2016-04-15 17:13:59 +02:00
Brian Coca
7062e086d4 made paging marker configurable as boto differs 2016-04-15 10:37:32 -04:00
nitzmahone
e75077fb23 bump submodule refs 2016-04-14 15:57:45 -07:00
Peter Sprygada
9111efc975 adds two new regex filters for use in playbooks (#14696)
The first filter is regex_search which adds the ability to do a regex
search on a fact.  The filter supports returning either all capture groups
or a set of capture groups (either by index or named).

Example usage of regex_search filter

debug: msg="{{ out.stdout[0] | regex_search('image version. (?P<test>\d+).(\d+)', '\\g<test>', '\\2' ) }}"

The second filter is regex_findall with adds the capability to do a
regex findall on a fact or variable and return all occurances of a pattern.

debug: msg="{{ out.stdout[0] | regex_findall('vlan (\d+)' }}"

The filter supports two addtional keyword arguments, ignorecase=[true, false]
and multiline=[true, false]
2016-04-14 14:54:03 -04:00