1. 30 Sep, 2015 6 commits
  2. 26 Sep, 2015 1 commit
    • task logging revamp · 37a91843
       * allow global no_log setting, no need to set at play or task level, but can be overriden by them
       * allow turning off syslog only on task execution from target host (manage_syslog), overlaps with no_log functionality
       * created log function for task modules to use, now we can remove all syslog references, will use systemd journal if present
       * added debug flag to modules, so they can make it call new log function conditionally
       * added debug logging in module's run_command
      Brian Coca committed
  3. 25 Sep, 2015 1 commit
  4. 24 Sep, 2015 5 commits
  5. 18 Sep, 2015 2 commits
  6. 17 Sep, 2015 5 commits
  7. 15 Sep, 2015 1 commit
  8. 14 Sep, 2015 2 commits
  9. 11 Sep, 2015 3 commits
    • 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
  10. 10 Sep, 2015 1 commit
  11. 09 Sep, 2015 1 commit
  12. 08 Sep, 2015 2 commits
  13. 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
  14. 04 Sep, 2015 3 commits
  15. 03 Sep, 2015 3 commits
  16. 02 Sep, 2015 2 commits