You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/units
Alex Schultz a5c85b477b
Fix IncludedFile equality check (#69524) (#69885)
In the case of a free style strategy, it is possible to end up with
multiple hosts trying to include from the same role, however the tasks
being included may be different with the use of tasks_from.  Previously
if you had two hosts that were included the same role when the
process_include_results function tries to determine if a included needs
to be run on a specific host, it would end up merging two different
tasks into which ever one was processed first.

This change updates the equality check to also check if the task uuid
associated with the IncludedFile is the same. The previous check only
checked if the task's parent uuid was the same. This breaks down when
both includes have the same parent.

    - hosts: all
      strategy: free
      gather_facts: false
      tasks:
        - include_role:
            name: random_sleep
        - block:
          - name: set a fact (1)
            include_role:
              name: set_a_fact
              tasks_from: fact1.yml
          - name: set a fact (2)
            include_role:
              name: set_a_fact
              tasks_from: fact2.yml
        - name: include didn't run
          fail:
            msg: >
              set_a_fact didn't run
              fact1: {{ fact1 | default('not defined')}}
              fact2: {{ fact2 | default('not defined') }}"
          when: (fact1 is not defined or fact2 is not defined)

Closes #69521

(cherry picked from commit 247e43b252)
6 years ago
..
cli galaxy - preserve mode properly on artifact (#68418) - 2.9 (#68451) 6 years ago
compat Move unit test compat code out of `lib/ansible/`. (#46996) 7 years ago
config Fix inline vaults for plugins in ensure_type (#67492) (#67741) 6 years ago
contrib Fix vmware_inventory unit tests so they run. 7 years ago
errors Add better error when k=v syntax is used with YAML in tasks (#41754) 7 years ago
executor [stable-2.9] Fix filedescriptor out of range in select() when running commands (#65058) (#69517) 6 years ago
galaxy ansible-galaxy - Fix tar path traversal issue during install - CVE-2020-10691 - 2.9 (#68601) 6 years ago
inventory_test_data/group_vars Merge branch 'v2_final' into devel_switch_v2 11 years ago
mock Move unit test compat code out of `lib/ansible/`. (#46996) 7 years ago
module_utils [stable-2.9] Fix filedescriptor out of range in select() when running commands (#65058) (#69517) 6 years ago
modules routeros_facts: prevent crash of module when ipv6 package is not installed (#68554) 6 years ago
parsing Add a representer for AnsibleUnsafeBytes (#62598) 6 years ago
playbook Fix IncludedFile equality check (#69524) (#69885) 6 years ago
plugins [stable-2.9] Allow the use of paramiko_conn before connection (#61570) (#69642) 6 years ago
regex Add toggle to control invalid character substitution in group names (#52748) 7 years ago
template [stable-2.9] Do not treat AnsibleUndefined as being unsafe (#65202) (#65427) 6 years ago
utils fix get_data on case_insensitive fs (#69955) 6 years ago
vars Fix inventory cache interface (#50446) 7 years ago
__init__.py Add empty-init code-smell script. (#18406) 9 years ago
requirements.txt [stable-2.9] Fix ansible-test collections requirements installation. (#62181) 6 years ago
test_constants.py 1st part of ansible config, adds ansible-config to view/manage configs (#12797) 9 years ago
test_context.py Unit tests: remove unused imports (#59740) 7 years ago