This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
TMP_DIR=tmp_include_roles_repro | |
mkdir -p $TMP_DIR/roles/{x,y}/tasks | |
cat > $TMP_DIR/playbook.yml << EOF | |
- hosts: localhost | |
tasks: | |
- set_fact: | |
role_name_in_fact: "x" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
TMP_DIR=tmp_group_vars | |
mkdir -p $TMP_DIR/{dir,group_vars,inv}/ | |
cat > $TMP_DIR/playbook.yml << EOF | |
- include: dir/playbook2.yml | |
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/ansible/plugins/strategy/__init__.py b/lib/ansible/plugins/strategy/__init__.py | |
index 6a9428ddfd..a6bee588ef 100644 | |
--- a/lib/ansible/plugins/strategy/__init__.py | |
+++ b/lib/ansible/plugins/strategy/__init__.py | |
@@ -865,10 +865,10 @@ class StrategyBase: | |
# * raise an error or show a warning when a conditional is used | |
# on a meta task that doesn't support them | |
- def _evaluate_conditional(h): | |
- all_vars = self._variable_manager.get_vars(play=iterator._play, host=h, task=task) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2017 Ansible Project | |
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) | |
# Make coding more python3-ish | |
from __future__ import (absolute_import, division, print_function) | |
__metaclass__ = type | |
from ansible.compat.tests import unittest | |
from ansible.compat.tests.mock import patch, MagicMock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DIR=tmp_36028 | |
mkdir -p $DIR/roles/my_role/{tasks,library} | |
cat > $DIR/playbook.yml << EOF | |
- hosts: localhost | |
gather_facts: no | |
pre_tasks: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DIR=tmp_36028 | |
mkdir -p $DIR/roles/{my_role,my_role2}/{tasks,library} | |
cat > $DIR/playbook.yml << EOF | |
- hosts: localhost | |
gather_facts: no | |
roles: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/ansible/plugins/strategy/linear.py b/lib/ansible/plugins/strategy/linear.py | |
index d9a0c185e8..5a2a9bcc09 100644 | |
--- a/lib/ansible/plugins/strategy/linear.py | |
+++ b/lib/ansible/plugins/strategy/linear.py | |
@@ -335,6 +335,24 @@ class StrategyModule(StrategyBase): | |
else: | |
new_blocks = self._load_included_file(included_file, iterator=iterator) | |
+ | |
+ def _create_noop_block(original_block, parent): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Upstream Jinja2 native types docs: http://jinja.pocoo.org/docs/2.10/nativetypes/ | |
# Upstream Jinja2 native types PR: https://github.com/pallets/jinja/pull/708 | |
# Jinja2 native types in Ansible PR: https://github.com/ansible/ansible/pull/32738 | |
# ansible-devel@ announcement: https://groups.google.com/forum/#!topic/ansible-devel/o42OoC0VZ4A | |
# Preserving types of castings | |
- hosts: localhost | |
gather_facts: no | |
vars: | |
adict: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/ansible/executor/task_queue_manager.py b/lib/ansible/executor/task_queue_manager.py | |
index 67a741b989..844ab621a8 100644 | |
--- a/lib/ansible/executor/task_queue_manager.py | |
+++ b/lib/ansible/executor/task_queue_manager.py | |
@@ -232,7 +232,7 @@ class TaskQueueManager: | |
new_play = play.copy() | |
new_play.post_validate(templar) | |
- new_play.handlers = new_play.compile_roles_handlers() + new_play.handlers | |
+ new_play.handlers = new_play.handlers + new_play.compile_roles_handlers() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/ansible/plugins/strategy/__init__.py b/lib/ansible/plugins/strategy/__init__.py | |
index 41b74edabd..98466cb37c 100644 | |
--- a/lib/ansible/plugins/strategy/__init__.py | |
+++ b/lib/ansible/plugins/strategy/__init__.py | |
@@ -368,7 +368,7 @@ class StrategyBase: | |
return self._inventory.get_host(host_name) | |
def search_handler_blocks_by_name(handler_name, handler_blocks): | |
- for handler_block in handler_blocks: | |
+ for handler_block in reversed(handler_blocks): |
OlderNewer