- 15 Sep, 2015 1 commit
-
-
Brian Coca committed
-
- 14 Sep, 2015 2 commits
-
-
James Cammarata committed
-
Fixes #12053
James Cammarata committed
-
- 11 Sep, 2015 4 commits
-
-
1. The test did "name: '{{hostnames}}.{{item}}'" inside a with_sequence loop, which didn't do what was intended: it expanded hostnames into an array, appended ".1", and set name to the resulting string. This can be converted to a simple with_items loop. 2. Some of the entries in hostnames contained punctuation characters, which I see no reason to support in inventory hostnames anyway. 3. Once the add_host failures are fixed, the playbook later fails when the unicode hostnames are interpolated into debug output in ssh.py due to an encoding error. This is only one of the many places that may fail when using unicode inventory hostnames; we work around it by providing an ansible_ssh_host setting.
Abhijit Menon-Sen committed -
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.
Abhijit Menon-Sen committed -
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).
Abhijit Menon-Sen committed -
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.
Marius Gedminas committed
-
- 10 Sep, 2015 1 commit
-
-
James Cammarata committed
-
- 09 Sep, 2015 2 commits
-
-
Rene Moser committed
-
Toshio Kuratomi committed
-
- 08 Sep, 2015 2 commits
-
-
Toshio Kuratomi committed
-
Fixes #12245
James Cammarata committed
-
- 07 Sep, 2015 2 commits
-
-
Marius Gedminas committed
-
The full error was ====================================================================== ERROR: test_task_executor_execute (units.executor.test_task_executor.TestTaskExecutor) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/mg/src/ansible/test/units/executor/test_task_executor.py", line 252, in test_task_executor_execute mock_action.run.return_value = dict(ansible_facts=dict()) File "/home/mg/src/ansible/lib/ansible/executor/task_executor.py", line 317, in _execute if self._task.async > 0: TypeError: unorderable types: MagicMock() > int() ---------------------------------------------------------------------- Experiments show that Python 2 MagicMock() > 0 is true, so I'm setting the async property on mock_task to 1. (If I set it to 0, the test fails anyway.)
Marius Gedminas committed
-
- 04 Sep, 2015 3 commits
-
-
Required some rewiring in inventory code to make sure we're using the DataLoader class for some data file operations, which makes mocking them much easier. Also identified two corner cases not currently handled by the code, related to inventory variable sources and which one "wins". Also noticed we weren't properly merging variables from multiple group/host_var file locations (inventory directory vs. playbook directory locations) so fixed as well.
James Cammarata committed -
simplify become testing and handling, we had drifted and were doulbe checking prompt, become and become_pass fixed tests to conform to new signature and now tests both with and w/o password now we are more explicit about self.prompt
Brian Coca committed -
Fixes #12198 Fixes #12241
Toshio Kuratomi committed
-
- 03 Sep, 2015 3 commits
-
-
James Cammarata committed
-
Also fix the bug (missing from six import iteritems) I introduced in 823677b4.
Marius Gedminas committed -
Replace .iteritems() with six.iteritems() everywhere except in module_utils (because there's no 'six' on the remote host). And except in lib/ansible/galaxy/data/metadata_template.j2, because I'm not sure six is available there.
Marius Gedminas committed
-
- 02 Sep, 2015 7 commits
-
-
Toshio Kuratomi committed
-
James Cammarata committed
-
ansible is passing unicode arond internally so we should test the same data. * Add a zero length test for _count_newlines and fix the zero newlines test to have no newlines.
Toshio Kuratomi committed -
Toshio Kuratomi committed
-
Brian Coca committed
-
Brian Coca committed
-
Because __cmp__ is not supported on Python 3.
Marius Gedminas committed
-
- 01 Sep, 2015 1 commit
-
-
* Dedupe combine_vars() code (removed from VariableManager) * Fix merge_hash algorithm to preserve the type * unittest combine_vars and merge_hash
Toshio Kuratomi committed
-
- 31 Aug, 2015 1 commit
-
-
Fixes #11891
Toshio Kuratomi committed
-
- 28 Aug, 2015 2 commits
-
-
James Cammarata committed
-
Brian Coca committed
-
- 27 Aug, 2015 5 commits
-
-
`assert (condition, message)` gets parsed by Python as `assert a_two_tuple`, and a 2-element tuple is never False. Discovered by compileall on Python 3.4, which emits a SyntaxWarning for this common mistake.
Marius Gedminas committed -
Marius Gedminas committed
-
Marius Gedminas committed
-
Marius Gedminas committed
-
Note that this test was broken in devel because it was really just duplicating the AES256 test because setting v.cipher_name to 'AES' no longer selected AES after it was de-write-whitelisted. Now that we've removed the VaultAES encryption code, we embed static output from an earlier version and test that we can decrypt it.
Abhijit Menon-Sen committed
-
- 26 Aug, 2015 3 commits
-
-
Abhijit Menon-Sen committed
-
Abhijit Menon-Sen committed
-
Fixes #11981 Fixes #11995 Fixes #12039 Fixes #12077
James Cammarata committed
-
- 25 Aug, 2015 1 commit
-
-
Toshio Kuratomi committed
-