Commit graph

5053 commits

Author SHA1 Message Date
James Cammarata
b2848bd25f Merge pull request #12389 from amenonsen/minus-t
Set PlayContext.timeout from the value specified by -T on the command-line
2015-09-16 09:49:39 -04:00
James Cammarata
d91ff0db74 Fixing parent block serialization for blocks
Fixes #12395
2015-09-16 09:29:16 -04:00
Abhijit Menon-Sen
85bb508f26 Set PlayContext.timeout from the value specified by -T on the command-line
Fixes #12372
2015-09-16 08:57:25 +05:30
James Cammarata
2a50957ad8 Fix galaxy install dep failure
Also fixes issue where force does not force reinstall of deps

Fixes #10425
2015-09-15 17:31:47 -04:00
Toshio Kuratomi
1a39e32a13 Update core modules ref 2015-09-15 14:26:09 -07:00
James Cammarata
a1948dd1c1 Merge branch 'bcoca-normalize_plugin_paths' into devel 2015-09-15 14:48:11 -04:00
James Cammarata
a7e1113b26 Removing FIXME comment which is no longer required 2015-09-15 14:47:49 -04:00
James Cammarata
d818a72375 Merge branch 'normalize_plugin_paths' of https://github.com/bcoca/ansible into bcoca-normalize_plugin_paths 2015-09-15 14:41:09 -04:00
James Cammarata
60c139e482 Fix logic for changed/failed_when + retry/until loops
Fixes #11809
2015-09-15 13:37:35 -04:00
James Cammarata
8e664ad226 Fix delegate_to localhost vs. 127.0.0.1 (and ::1) 2015-09-15 13:08:54 -04:00
James Cammarata
38573c55bf Tweak failure condition for field attributes expected to be strings 2015-09-15 13:08:40 -04:00
James Cammarata
cfdaec0c22 Make sure string attributes are strings from YAML to avoid bad type conversions
Fixes #12367
2015-09-15 12:17:55 -04:00
Brian Coca
b6d6c2e4db corrected all missing paths changes 2015-09-15 11:57:54 -04:00
Brian Coca
4aea1f6568 normalized plugin paths and names and configs 2015-09-15 11:44:09 -04:00
Brian Coca
02372e9761 Merge pull request #12371 from apollo13/patch-1
Remove duplicate SU_PROMPT_LOCALIZATIONS
2015-09-15 09:54:07 -04:00
Florian Apolloner
9334046189 Remove duplicate SU_PROMPT_LOCALIZATIONS 2015-09-15 10:40:25 +02:00
gptech
1c6be7b9ba Replace 'degug' with 'debug'
Tiny typo fix.
2015-09-14 23:21:03 -04:00
Andriy Yurchuk
af213241ab Fix typo 2015-09-14 21:11:40 +02:00
Brian Coca
e7807c4f2d Merge pull request #12339 from emonty/feature/openstack-no-log
Add no-log parameter to common openstack args
2015-09-14 15:03:09 -04:00
James Cammarata
4f30db8ca5 Check if path is /dev/null when checking if a file is in fact a file 2015-09-14 14:41:22 -04:00
James Cammarata
feee4613cd Merge pull request #12357 from apollo13/become_fix
Fixed #12356 -- Restored ansible 1.9.x become behavior.
2015-09-14 12:27:45 -04:00
James Cammarata
49ca0eb797 Track local_action internally to prevent it from being overridden
Fixes #12053
2015-09-14 12:11:58 -04:00
Florian Apolloner
8182eb3787 Fixed #12356 -- Restored ansible 1.9.x become behavior. 2015-09-14 17:53:14 +02:00
Monty Taylor
3bdd6793ca Add no-log parameter to common openstack args
These bad boys can contain secret data, so should be marked no-log.
2015-09-13 19:48:37 +02:00
James Cammarata
aa762bb432 Don't split args out unless we're parsing module args using the new style
Fixes #12331
2015-09-12 17:50:05 -04:00
James Cammarata
1cb4e0be1c Fix bug in implicit block squashing where block is not reassigned
Fixes #12333
2015-09-12 11:27:30 -04:00
James Cammarata
7deb8bbd1c Reworking how includes within handlers are run
Fixes #12238
2015-09-12 08:46:29 -04:00
Brian Coca
03758151e4 Merge pull request #12330 from cchurch/revert_find_plugin_changes
Revert "Fix order of loading of modules."
2015-09-11 20:05:37 -04:00
Brian Coca
9d4d7bd74d fixed porting bugs in profile_tasks to v2 2015-09-11 16:48:09 -04:00
Chrrrles Paul
ba7734b78b Merge pull request #12165 from amenonsen/address-parsing
Hi @amenonsen - thanks for fixing up the hunting down the unicode bug and expanding test_addresses.  The code looks good, merging!-- Be systematic about parsing and validating hostnames and addresses
2015-09-11 15:25:50 -05:00
James Cammarata
4156bcedf5 Fix typo in 049a48f 2015-09-11 15:54:24 -04:00
Chris Church
ed3a9795d4 Revert "Fix order of loading of modules."
This reverts commit 4b895f04e3.
2015-09-11 14:16:30 -04:00
James Cammarata
1243686b90 Submodule update 2015-09-11 13:11:15 -04:00
Abhijit Menon-Sen
049a48f3d3 Test state.tasks_child_state before dereferencing
I hit a traceback in the FAILED_TASKS case, but it seemed prudent to add
guards in the other similar branches.
2015-09-11 21:59:08 +05:30
James Cammarata
df89f03627 Fixing precedence order for new nonpersistent vars (set_fact/register)
These used to go in vars_cache, so merging them in after that as they
are "live" variables and the user would most likely want to see these
above anything else.
2015-09-11 12:24:44 -04:00
Abhijit Menon-Sen
7479ab47e0 Be stricter about parsing hostname labels
Labels must start with an alphanumeric character, may contain
alphanumeric characters or hyphens, but must not end with a hyphen.
We enforce those rules, but allow underscores wherever hyphens are
accepted, and allow alphanumeric ranges anywhere.

We relax the definition of "alphanumeric" to include Unicode characters
even though such inventory hostnames cannot be used in practice unless
an ansible_ssh_host is set for each of them.

We still don't enforce length restrictions—the fact that we have to
accept ranges makes it more complex, and it doesn't seem especially
worthwhile.
2015-09-11 21:47:19 +05:30
Abhijit Menon-Sen
065bb52109 Be systematic about parsing and validating hostnames and addresses
This adds a parse_address(pattern) utility function that returns
(host,port), and uses it wherever where we accept IPv4 and IPv6
addresses and hostnames (or host patterns): the inventory parser
the the add_host action plugin.

It also introduces a more extensive set of unit tests that supersedes
the old add_host unit tests (which didn't actually test add_host, but
only the parsing function).
2015-09-11 21:47:18 +05:30
James Cammarata
49803509b4 Make sure include paths are templated before dwim in case they're absolute
Fixes #12327
2015-09-11 11:57:43 -04:00
James Cammarata
4cdd9b2a82 Merge pull request #12318 from mgedmin/py3k
Python 3: make ansible.template.safe_eval() work
2015-09-11 10:44:37 -04:00
Brian Coca
52f587cac3 Merge pull request #12325 from quinot/topic/wrong_interp_test
Test for Python must be against basename of interpreter
2015-09-11 09:47:49 -04:00
James Cammarata
c2115c3715 Re-adding part of 926f127 which was actually fixing #12277 2015-09-11 09:45:27 -04:00
James Cammarata
083aef65ad Revert "set_fact should put facts in the fact_cache, not vars_cache"
This reverts commit 926f127245.
2015-09-11 09:45:27 -04:00
Thomas Quinot
0bc9223826 Test for Python must be against basename of interpreter
Followup on issue #12076
2015-09-11 13:29:34 +02:00
James Cammarata
441a8af671 Merge pull request #12267 from h-hirokawa/add_replacer_jsonargs
Add the new module replacer <<INCLUDE_ANSIBLE_MODULE_JSON_ARGS>>.
2015-09-11 02:44:50 -04:00
Marius Gedminas
f91b28ef23 Fix safe_eval() of set literals
There was code to support set literals (on Python 2.7 and newer), but it
was buggy: SAFE_NODES.union() doesn't modify SAFE_NODES in place,
instead it returns a new set object that is then silently discarded.

I added a unit test and fixed the code.  I also changed the version
check to use sys.version_tuple instead of a string comparison, for
consistency with the subsequent Python 3.4 version check that I added in
the previous commit.
2015-09-11 09:41:05 +03:00
Marius Gedminas
2b73002044 Python 3: make ansible.template.safe_eval() work
Two things changed in Python 3.4:

- 'basestring' is no longer defined, so use six.string_types

- True/False are now special AST node types (NamedConstant) rather than
  just names

(Good thing we had tests, or I wouldn't have noticed the 2nd thing!)

I found only one place where safe_eval() is called inside the ansible
codebase: in lib/template/__init__.py.  The call to safe_eval(result,
...) is protected by result.startswith('...'), which means result cannot
possibly be a byte string on Python 3 (or startswith() would raise, so
six.string_types (which excludes byte strings on Python 3) is fine here.
2015-09-11 09:37:44 +03:00
James Cammarata
0c5bbe3c32 Use the original (un-templated) args for include params
Fixes #12314
2015-09-11 00:53:27 -04:00
James Cammarata
292e2da4e1 Fix some bugs related to facts/nonpersistent-facts cache split
Fixes #12313
2015-09-10 17:36:39 -04:00
Brian Coca
91c9df2154 added verbosity to ansible-doc to make it easier to trace down issues 2015-09-10 16:50:14 -04:00
James Cammarata
b35529b09f Submodule pointer update 2015-09-10 15:44:30 -04:00