Commit Graph

822 Commits (d9f398ec91df9d112871518a5ea59da47226959a)

Author SHA1 Message Date
Toshio Kuratomi e25caebe7a Cleanups to docs and rename of inv var 9 years ago
Brian Coca db61e9be0c add ansible_executable inventory var
also handle the overrides appropriately
also new executable to set shell type
9 years ago
Brian Coca 292be944c6 ensure we use delegated vars on delegation
this prevents falling back to connection vars from the inventory_hostname
when matching connection var is not in delegated host.
9 years ago
Toshio Kuratomi 512825455e Make ohai and facter work via module_utils Fact classes rather than in the setup module 9 years ago
Toshio Kuratomi 5a1e35224b Make changes proposed during review of restrict fact gathering feature:
* Make documentation examples into code blocks
* Make code to call the subsets more general.
* Made min subset always execute (cannot disable it).
* Use a passed in modules parameter rather than global modules.  This is needed for ziploader
* Remove unneeded __init__()
* Remove uneeded multiple inheritance from a base class
* gather_facts is now a list type
9 years ago
Toshio Kuratomi d665911bab Allow FieldAttribute lists and sets to be set from a comma separated string 9 years ago
Yannig Perré 88772b6003 Add a way to restrict gathered facts in Ansible:
- Using gather_subset options
- By ignoring ohai/chef or facter/puppet facts
9 years ago
James Cammarata ccf646665b Revert "Removing explicit setting of failed/failed_when"
This reverts commit 4e528e9535.
9 years ago
James Cammarata 4e528e9535 Removing explicit setting of failed/failed_when 9 years ago
Brian Coca df1268ed69 Merge pull request #14892 from dagwieers/patch-14
Another misspelling
9 years ago
Dag Wieers a5e11b1325 Another misspelling
...while reading the source
9 years ago
Dag Wieers d7d04ad2cd Fix misspelling and some cosmetic change 9 years ago
Brian Coca 7067bb32b8 make all conditionals lists
this brings them to equivalence with when:
fixes #13905
9 years ago
James Cammarata 299d93f6e9 Updating unit tests for PlayIterator
This knowingly introduces a broken test, planning to fix that later.
9 years ago
John Barker 8b4ebd8e4a Make it easier to read error message 9 years ago
Brian Coca e762095497 better task parsing errors
fixes #14790
9 years ago
Brian Coca 7ba790bbaf don't tempalte register 9 years ago
夏恺(Xia Kai) d033c40e80 Make task repr really work for meta tasks.
Signed-off-by: 夏恺(Xia Kai) <xiaket@xiaket@gmail.com>
9 years ago
Brian Coca e2d2798a42 hosts can be list or string 9 years ago
Brian Coca 2d56293768 default play name to hosts entry
return to previous behaviour as now the name was left blank
9 years ago
James Cammarata da02aba173 Don't inject PlayContext properties as variables if they're None
Fixes bug introduced in 078ebb0
9 years ago
James Cammarata 078ebb0dec 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
9 years ago
Brian Coca 3b3709e715 Merge pull request #14488 from bcoca/become_shell_fixes
shell + become fixes
9 years ago
James Cammarata 58a6cf822a Merge pull request #13203 from willthames/galaxy_10620
Allow tree-ish versions for ansible-galaxy
9 years ago
Brian Coca 6dc910c13a shell + become fixes
1 less level of shell + quoting
simplified become commands, less quote and shell
9 years ago
Brian Coca 0bb49090cf make some options not mandatory to pass
this should simplify api calls
9 years ago
James Cammarata 06b072c1f7 Fix bugs related to task_includes and dep chain inheritance
* Fix the way task_include fields were created and copied
* Have blocks get_dep_chain() look at task_include's blocks for proper
  dep chain inheritance
* Fix the way task_include fields are copied to prevent a recursive
  degradation

Fixes #14460
9 years ago
James Cammarata 275728e0f6 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
9 years ago
James Cammarata 75b6f61619 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
9 years ago
Brian Coca 28cf4bc00b fix incorrect environment processing
it was assumed it could only be a dict or string (it starts out as a list)
also a 2nd assumption that bare vars only would appear in one of the dict keys.

removed deprecation warnings from here as they should be signaled in the bare conversion itself.
9 years ago
Brian Coca 6bf2f45ff5 fix for so su works in more cases
should not fail anymore on csh, fish nor the BSDs
fixes #14116
9 years ago
James Cammarata 07a9a54b0e Fix lookup of parent attribute when parent doesn't have the attr
Fixes #14100
9 years ago
James Cammarata a8ffa02134 Make sure blocks use their parents dependency chains
Fixes a bug inroduced in fb797a9 where included tasks in a role
were not being executed because the child blocks had no dep chain
set.
9 years ago
James Cammarata 2b02e8e2b4 Allow certain base attributes to be used as role params
Role definitions typically require params to be different from those
which are specified as FieldAttributes on the playbook classes used
for roles, however a certain subset should be allowed (typically those
used for connection stuff).

Fixes #14095
9 years ago
James Cammarata fb797a9e77 Fixing role dependency chain creation
The dep chain for roles created during the compile step had bugs, in
which the dep chain was overwriten and the original tasks in the role
were not assigned a dep chain. This lead to problems in determining
whether roles had already run when in a "diamond" structure, and in
some cases roles were not correctly getting variables from parents.

Fixes #14046
9 years ago
James Cammarata e3a6accc1d Forward conditionals onto included plays when conditional eval errors
When using a playbook-level include, we now catch any errors raised during
the conditional evaluation step and set a flag to indicate we need to pass
those conditionals on to the included play (most likely because they contain
inventory variables for evaluation).

Fixes #14003
9 years ago
James Cammarata c8bbdd6b39 Don't assign both parent blocks and task includes to blocks
This causes problems when fetching parent attributes, as the include
was being skipped because the parent block would fetch the attribute
from the parent play first.

Fixes #13872
9 years ago
James Cammarata d07d974ad8 Revert "Properly look for parent become attribute"
This reverts commit 1b46a422aa.
9 years ago
James Cammarata 1b46a422aa Properly look for parent become attribute
Corrects inheritence of the boolean value, which needs some special
consideration from other (string/int) values.

Fixes #13872
9 years ago
James Cammarata 1af473548b Fix role hashing failure/traceback when params contain lists
Fixes #13857
9 years ago
James Cammarata 1733d434d1 Fix with loop + delegate issues
* Don't re-use the existing connection if the remote_addr field of
  the play context has changed
* When overriding variables in PlayContext (from task/variables),
  don't set the same attribute based on a different variable name
  if we had already previously set it from another variable name

Fixes #13880
9 years ago
James Cammarata 1825b4a9c7 Fix any_errors_fatal incorrect implementation in 2.0
Also adds that flag to blocks.

Fixes #13744
9 years ago
James Cammarata b58673289a Split up comma-separated tags properly
Fixes #13795
9 years ago
Thomas Quinot 2eb22d5536 Fix minor typo in comment 9 years ago
Brian Coca d3deb24ead output color is now configurable 9 years ago
Brian Coca 56454d6a91 added newer vars to 'reset_vars'
these vars pass back info to the task about the connection
moved to their own block at start at file for readability and
added the newer standard vars
9 years ago
Brian Coca 202b92179d corrected role path search order
the unfraking was matching roles in current dir as it always returns a full path,
pushed to the bottom as match of last resort
fixes #13645
9 years ago
Yannig Perré a4674906c6 Merge role params into variables separately from other variables
Fixes #13617
9 years ago
James Cammarata 3ec0104128 Fixing bugs in conditional testing with until and some integration runner tweaks 9 years ago
Toshio Kuratomi 224d596336 Remove args from get_name() as we can't tell if any of the args are no_log 9 years ago