summaryrefslogtreecommitdiff
path: root/lib/ansible/playbook/task.py
Commit message (Collapse)AuthorAgeFilesLines
* added versions to dep notices (#24019)Brian Coca2017-04-271-1/+1
| | | | | | | | * added versions to dep notices * pep7 * string
* removed debug printBrian Coca2017-04-131-1/+0
|
* fix environment validation, make setup exceptionBrian Coca2017-04-121-19/+34
| | | | | | | | removed bare vars now environment inheritance correclty prepends this allows more local to override more general fixes #23180
* Update module_utils.six to latest (#22855)Toshio Kuratomi2017-03-231-1/+1
| | | | | | | | * Update module_utils.six to latest We've been held back on the version of six we could use on the module side to 1.4.x because of python-2.4 compatibility. Now that our minimum is Python-2.6, we can update to the latest version of six in module_utils and get rid of the second copy in lib/ansible/compat.
* moved any_errors_fatal to base (#21585)Brian Coca2017-03-021-1/+0
|
* Update any_errors_fatal field attributes in block/task to match playJames Cammarata2017-02-171-1/+1
|
* refactoring asyncBrian Coca2017-02-061-1/+1
| | | | | | | | | | | | | | | | | | | | | - centralized skipping - also fixed module name broken by previous refactor - let action modules handle async processing - moved async into base action class's module exec - action plugins can now run final action as async - actually skip copy if base skips - fixed normal for new paths - ensure internal stat is never async - default poll to 10 as per docs - added hint for callback fix on poll - restructured late tmp, now a pipeline query - moving action handler to connection as networking does - fixed network assumption invocation is always passed - centralized key cleanup, normalized internal var - _supress_tmpdir_delete now in _ansible_xxx and gets removed from results - delay internal key removal till after we use em - nicer tmp removing, using existing methods - moved cleanup tmp flag to mking tmp func
* minor spelling changesCarlos E. Garcia2016-12-131-1/+1
|
* Performance improvement using in-operator on dictsDag Wieers2016-11-171-2/+2
| | | | | | | Just a small cleanup for the existing occurrences. Using the in-operator for hash lookups is faster than using .keys() http://stackoverflow.com/questions/29314269/why-do-key-in-dict-and-key-in-dict-keys-have-the-same-output
* Add option to prepend inherited attributes when extending valuesJames Cammarata2016-11-141-2/+2
| | | | Fixes #18483
* Don't copy the parent block of TaskIncludes when loading staticallyJames Cammarata2016-11-111-6/+0
| | | | | | | | | | | | | | When loading an include statically, we previously were simply doing a copy() of the TaskInclude object, which recurses up the parents creating a new lineage of objects. This caused problems when used inside load_list_of_blocks as the new parent Block of the new TaskInclude was not actually in the list of blocks being operated on. In most circumstances, this did not cause a problem as the new parent block was a proper copy, however when used in combination with PlaybookInclude (which copies conditionals to the list of blocks loaded) this untracked parent was not being properly updated, leading to tasks being run improperly. Fixes #18206
* Fixing parentage of include_role objects for param inheritanceJames Cammarata2016-09-301-1/+1
| | | | Fixes #17686
* removed deprecated first available file from tasks (#17643)Brian Coca2016-09-271-1/+0
| | | https://docs.ansible.com/ansible/porting_guide_2.0.html#deprecated
* removed deprecated 'bare' templating environment (#17640)Brian Coca2016-09-271-2/+2
| | | https://docs.ansible.com/ansible/porting_guide_2.0.html#deprecated
* Move uses of to_bytes, to_text, to_native to use the module_utils version ↵Toshio Kuratomi2016-09-061-15/+11
| | | | | | | | (#17423) We couldn't copy to_unicode, to_bytes, to_str into module_utils because of licensing. So once created it we had two sets of functions that did the same things but had different implementations. To remedy that, this change removes the ansible.utils.unicode versions of those functions.
* Don't do parent stuff during serialize if squashed or finalizedJames Cammarata2016-08-311-5/+6
|
* Some further cleanup in the meta branchJames Cammarata2016-08-311-21/+5
| | | | | | * adds squashing to objects, which allows them to be squashed down to a final "view" before post_validate to avoid expensive evaluations of parent attributes
* Meta meta metaJames Cammarata2016-08-311-1/+1
|
* Several fixes for includesJames Cammarata2016-08-111-0/+5
| | | | | | | | | * when including statically, make sure that all parents were also included statically (issue #16990) * properly resolve nested static include paths * print a message when a file is statically included Fixes #16990
* Move tasks/blocks to a single parent modelJames Cammarata2016-08-081-62/+47
|
* Performance improvementsJames Cammarata2016-08-081-3/+4
|
* fixed lookup search path (#16630)Brian Coca2016-07-131-0/+23
| | | | | | | | | | | | | | | | | | | | | * fixed lookup search path added ansible_search_path var that contains the proper list and in order removed roledir var which was only used by first_found, rest used role_path added needle function for lookups that mirrors the action plugin one, now both types of plugins use same pathing. * added missing os import * renamed as per feedback * fixed missing rename in first_found * also fixed first_found * fixed import to match new error class * fixed getattr ref
* Prevent loop_control from being inherited via parent includesJames Cammarata2016-07-051-0/+3
| | | | Fixes #16542
* task get_path returns empty string when not in playBrian Coca2016-06-291-2/+4
|
* Don't modify the original task ds when preprocessing dataJames Cammarata2016-06-281-1/+1
| | | | | | | | In the case of using YAML anchors/aliases, YAML actually uses references to the duplicated object so any modifications to the original impacts later uses of the object. Fixes #13575
* Fixing issues with getattr caused by 5a3493bJames Cammarata2016-06-241-2/+4
|
* Track notified handlers by object rather than simply their nameJames Cammarata2016-06-201-1/+1
| | | | | | | | | | | | | | | | | | Due to the fact that roles may be instantiated with different sets of params (multiple inclusions of the same role or via role dependencies), simply tracking notified handlers by name does not work. This patch changes the way we track handler notifications by using the handler object itself instead of just the name, allowing for multiple internal instances. Normally this would be bad, but we also modify the way we search for handlers by first looking at the notifying tasks dependency chain (ensuring that roles find their own handlers first) and then at the main list of handlers, using the first match it finds. This patch also modifies the way we setup the internal list of handlers, which should allow us to correctly identify if a notified handler exists more easily. Fixes #15084
* Revert "don't tempalte register"James Cammarata2016-06-071-7/+0
| | | | | | This reverts commit 7ba790bbaf5059fb5a858227b7b1e5f852a1a288. Fixes #15700
* Reworking retry/until logic to fix bugsJames Cammarata2016-05-131-1/+1
| | | | | | | | Prior to this patch, the retry/until logic would fail any task that succeeded if it took all of the alloted retries to succeed. This patch reworks the retry/until logic to make things more simple and clear. Fixes #15697
* Make the loop variable (item by default) settable per taskJames Cammarata2016-04-191-0/+12
| | | | | | | Required for include+with* tasks which may include files that also have tasks containing a with* loop. Fixes #12736
* Revert "Removing explicit setting of failed/failed_when"James Cammarata2016-03-101-3/+3
| | | | This reverts commit 4e528e9535732b7541155b323cdab2377d74cc3a.
* Removing explicit setting of failed/failed_whenJames Cammarata2016-03-101-3/+3
|
* make all conditionals listsBrian Coca2016-03-091-3/+3
| | | | | this brings them to equivalence with when: fixes #13905
* better task parsing errorsBrian Coca2016-03-031-3/+7
| | | | fixes #14790
* don't tempalte registerBrian Coca2016-03-021-0/+7
|
* Make task repr really work for meta tasks.夏恺(Xia Kai)2016-03-011-1/+1
| | | | Signed-off-by: 夏恺(Xia Kai) <xiaket@xiaket@gmail.com>
* fix incorrect environment processingBrian Coca2016-02-011-5/+15
| | | | | | | 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.
* Fix lookup of parent attribute when parent doesn't have the attrJames Cammarata2016-01-261-5/+1
| | | | Fixes #14100
* Revert "Properly look for parent become attribute"James Cammarata2016-01-191-1/+1
| | | | This reverts commit 1b46a422aa52a90c9dd7b168be1fed9c4273b6b2.
* Properly look for parent become attributeJames Cammarata2016-01-191-1/+1
| | | | | | | Corrects inheritence of the boolean value, which needs some special consideration from other (string/int) values. Fixes #13872
* Fix any_errors_fatal incorrect implementation in 2.0James Cammarata2016-01-151-8/+11
| | | | | | Also adds that flag to blocks. Fixes #13744
* Fixing bugs in conditional testing with until and some integration runner tweaksJames Cammarata2015-12-191-1/+1
|
* Remove args from get_name() as we can't tell if any of the args are no_logToshio Kuratomi2015-12-191-3/+2
|
* Fixing bugs with {changed,failed}_when and until with registered varsJames Cammarata2015-12-181-0/+21
| | | | | | | | | | * Saving of the registered variable was occuring after the tests for changed/failed_when. * Each of the above fields and until were being post_validated too early, so variables which were not defined at that time were causing task failures. Fixes #13591
* Revert "avoid persistent containers in attribute defaults"Brian Coca2015-12-091-1/+1
| | | | | This reverts commit 87969868d42cd8aba1c65c8207d059d73407373b. found better way to do it
* avoid persistent containers in attribute defaultsBrian Coca2015-12-091-1/+1
| | | | | | | | | moved from the field attribute declaration and created a placeholder which then is resolved in the field attribute class. this is to avoid unwanted persistent of the defaults across objects which introduces stealth bugs when multiple objects of the same kind are used in succession while not overriding the default values.
* Fix typo from 5ae850cJames Cammarata2015-12-081-1/+1
|
* Make fact delegating configurable, defaulting to 1.x behaviorJames Cammarata2015-12-081-0/+1
|
* More meaningful string representation for meta tasks (like 'noop' and ↵Nils Steinger2015-12-051-1/+4
| | | | 'flush_handlers')
* Fix include param precedence in variable managerJames Cammarata2015-11-191-0/+8
|