Commit Graph

17722 Commits (ef7fe461fa2e74446331ab9dec26f389904c09d0)
 

Author SHA1 Message Date
Brian Coca ef7fe461fa added note about fact gathering task change
fixes #14655
10 years ago
Toshio Kuratomi 61e9841e08 normalize path components to unicode before combining or operating on them
Note that this will break if we deal with non-utf8 paths.  Fixing this
way because converting everythig to byte strings instead is a very
invasive task so it should be done as a specific feature to provide
support for non-utf8 paths at some point in the future (if needed).
10 years ago
Toshio Kuratomi 8c26d6d4f6 Use a unicode format string so that we don't convert to byte strings
Fixes #14349
10 years ago
Brian Coca de7aaf93f3 fixed issue with failed item ignoring no_log
backported from devel
10 years ago
Brian Coca 0782f33f0f dont error out on new internal vars 10 years ago
Brian Coca 62186efc91 pass diff and verbosity settings to modules
also simplifies and guarantees that all flags are always passed, even when false
this should make checks simpler as you always expect them to exist
10 years ago
Brian Coca 6925ab604e hosts can be list or string 10 years ago
Brian Coca 7733ff0a82 default play name to hosts entry
return to previous behaviour as now the name was left blank
10 years ago
Brian Coca 6648d42985 output color is now configurable 10 years ago
James Cammarata 292be2a982 Use abspath instead of realpath for group/host vars files
The use of realpath means when following symlinks the actual path is
used when loading these files in the VariableManager, which may not
line up with the host or group name specified.

Fixes #14545
10 years ago
James Cammarata f74ccadb8e Fix logic error when copying files recursively to a directory 10 years ago
Brian Coca 57626720ce preserve no_log for async also 10 years ago
James Cammarata 55d1235487 Don't inject PlayContext properties as variables if they're None
Fixes bug introduced in 078ebb0
10 years ago
James Cammarata 971b471595 issue callbacks per item and retry fails
- now workers passes queue to task_executor so it can send back events per item and on retry attempt
- updated result class to pass along events to strategy
- base strategy updated to forward new events to callback
- callbacks now remove 'items' on final result but process them directly when invoked per item
- new callback method to deal with retry attempt messages (also now obeys nolog)
- updated tests to match new signature of task_executor

fixes #14558
fixes #14072
10 years ago
Brian Coca 8f606e83f6 always return a checksum key, even if empty 10 years ago
James Cammarata c7368c2cb8 Fixing/cleaning up do/until logic in TaskExecutor
* Fixes bug where the task was not marked as failed if the number of
  retries were exceeded (#14461)
* Reorganizing logic to be a bit cleaner, and so retrie messages are
  shown before sleeping (which makes way more sense)

Fixes #14461
Fixes #14580
10 years ago
James Cammarata d7e3d7f3dc Don't re-inject become* variables as it causes problems when templating is involved
Prior to 75b6f61, we strictly limited variables we re-injected. After that
patch however, we re-injected everything which causes problems under certain
circumstances. For now, we'll continue to filter out some properties of
PlayContext for re-injection.

Fixes #14352
10 years ago
Toshio Kuratomi 8aebc7dcf1 Missed constants.py in the commit for #14557 10 years ago
Brian Coca 66fb125c91 added missing config to constants.py
fixes #14567
10 years ago
Brian Coca 9ba1da3ec9 better error messages when failing to decrypt 10 years ago
Dag Wieers 91e72b8e3b Improve efficiency of merge_hash
This is related to #14559, but only the part for Ansible v2.0

This commit makes merging empty dicts, or equal dicts more efficient.

I noticed that while debugging merge_hash a lot of merges related to empty dictionaries and sometimes also identical dictionaries.
10 years ago
Brian Coca 169d3ca51e added specific info to deprecation message
should now show actual variable that is undefined
fixes #14526
10 years ago
Brian Coca c58ad97665 added playbook and options info to callbacks
will display on certain verbosity levels, both playbook/file info
and non empty options with which it's running.
avoid errors when not using CLI classes
10 years ago
Brian Coca 6f5e855e64 updated to use to_unicode as per feedback 10 years ago
Marc Pujol b399fd64d4 Avoid duplicate /bin/lsblk calls in the setup module.
The setup module calls /bin/lsblk once for each device appearing in the /etc/mtab file. However, the same device appears there mutliple times when the system uses bind-mounts. As a result, /bin/lsblk is being called repeatedly to get the uuid of the same device.

On a system with many mounts, this leads to a TimeoutError in the get_mount_facts function of the setup module as described in #14551.

Fixes #14551
10 years ago
Maxim Burgerhout 7ca33faee6 Fix a typo in man1/ansible 10 years ago
Marcus Furlong 31ce8bc3a2 fix ansible_os_family fact on openSUSE Leap
ansible_os_family on openSUSE Leap has the wrong value:

        "ansible_os_family": "openSUSE Leap",

It should be:

        "ansible_os_family": "Suse",

This change fixes that by adding the relevant key and ensuring that dict
lookups replace ' ' with '_' so the key does not contain a space.
10 years ago
Brian Coca 6072dad15f use stat module instead of checksum code
- added new function for action plugins this avoids the very fragile checksum code that is shell dependant.
- ported copy module to it
- converted assemble to new stat function
- some corrections and ported temlpate
- updated old checksum function to use new stat one under the hood
- documented revamped remote checksum method
10 years ago
Brian Coca 35a5fe85f0 shell + become fixes
1 less level of shell + quoting
simplified become commands, less quote and shell
10 years ago
James Cammarata fd64e5958d Fixing bugs related to nested blocks inside roles
* Make sure dep chains are checked recursively for nested blocks
* Fixing iterator is_failed() check to make sure we're not in a
  rescue block before returning True
* Use is_failed() to test whether a host should be added to the TQM
  failed_hosts list
* Use is_failed() when compiling the list of hosts left to iterate
  over in both the linear and free strategies

Fixes #14222
10 years ago
Brian Coca a22c353022 properly combine vars if merge is set
hash_behaviour = merge now also applies to include vars
10 years ago
Brian Coca d743709c1a switched from threading to multiprocessing
functions same, just keeping names from confusing people
10 years ago
Brian Coca fa3f5c1de9 moved to base class for shell plugins
fish now sets env vars correctly
fish checksum now works
fixed and cleaned up imports
fixed typo
10 years ago
Toshio Kuratomi d25d06b0f4 Need to apply to_str to each element of the list so that we don't mix types in the join()
"Third time's the charm"
10 years ago
Brian Coca 1b88366905 really only want to prevent None typep here
false is sometimes needed
10 years ago
James Cammarata 0924a668e1 Handle run_once scenarios in the free strategy
* Raise an error if the action is using BYPASS_HOST_LOOP, to prevent
  unexpected behavior from those actions
* Show a warning regarding tasks marked as run_once, as the free strategy
  does not yet support that behavior
* Minor tweak to linear strategies run_once code to make sure we don't
  raise an error if an action isn't found
10 years ago
James Cammarata 2248b882c1 Make sure run_once tasks also set any_errors_fatal so all hosts fail
Currently implemented only in the linear strategy (free strategy simply
ignores run_once/BYPASS_HOST_LOOP actions).

Fixes #14252
10 years ago
James Cammarata 94afe2f0de Fix for copy test as ansible_ssh_user is not set by default now 10 years ago
Brian Coca 83a08b2a64 avoid errors from possible None/False args 10 years ago
James Cammarata 7fd9c4998d Fix the way we re-add variables from PlayContext to the variable dict
* If the internal value is None, do not add the variable
* Make sure all aliases for a given variable name are set (if they're
  not already set in the dictionary)

Fixes #14310
10 years ago
James Cammarata 0807368c79 Fixing bugs in play iteration and strategies
* Fixed a bug in PlayIterator when ITERATING_ALWAYS, where the block
  was advanced but the incorrect data structure elements were cleared
* Cleaned up the logic of is_failed() in PlayIterator
* Fixed a bug in the free strategy which had not been updated to use
  the base strategy _execute_meta() method
* Stopped strategies from using is_failed() to determine if tasks should
  still be fetched for a host

Fixes #14040
10 years ago
James Cammarata 50001f15c0 Removing .out file for integration tests and adding to .gitignore 10 years ago
James Cammarata bcf0551b72 Adding .retry files to .gitignore 10 years ago
Tobias Wolf c769846ba9 Do not print empty diffs with _display.display() 10 years ago
Tobias Wolf fd769c402e Do not insert newlines when diff is empty 10 years ago
Tobias Wolf dd98f5c6cc Fix handling of difflist containing multiple before/after pairs
Commit ansible/ansible@c337293 introduced a difflist feature. The return
value was not adequately outdented to append any diff after the first.
10 years ago
Brian Coca e5b5b78d3c hide internal params once used 10 years ago
Paul Calabro 233f4fc455 Adding a hyphen in the perms pattern section, since doing something like
go=- is a quick way to strip all permissions for non-owners.
10 years ago
Matthew Jones 94e7cde34e Add rax cache age ini documentation 10 years ago
Matthew Jones f08dc0e95f Add a config option for rackspace inventory cache
Adding a config and environment variable option for tuning the cache age
check in the rackspace inventory module
10 years ago