1. 15 Sep, 2015 1 commit
  2. 14 Sep, 2015 2 commits
  3. 11 Sep, 2015 4 commits
    • Fix broken integration test with unicode hostnames · 88a20e7a
      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
    • Be stricter about parsing hostname labels · 7479ab47
      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
    • Be systematic about parsing and validating hostnames and addresses · 065bb521
      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
    • Fix safe_eval() of set literals · f91b28ef
      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
  4. 10 Sep, 2015 1 commit
  5. 09 Sep, 2015 2 commits
  6. 08 Sep, 2015 2 commits
  7. 07 Sep, 2015 2 commits
    • Python 3: fix TypeError: unorderable types in test · 1a1c9203
      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
  8. 04 Sep, 2015 3 commits
  9. 03 Sep, 2015 3 commits
  10. 02 Sep, 2015 7 commits
  11. 01 Sep, 2015 1 commit
  12. 31 Aug, 2015 1 commit
  13. 28 Aug, 2015 2 commits
  14. 27 Aug, 2015 5 commits
  15. 26 Aug, 2015 3 commits
  16. 25 Aug, 2015 1 commit