Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid 2nd processing of facts for actions #37538

Merged
merged 1 commit into from Mar 22, 2018

Conversation

bcoca
Copy link
Member

@bcoca bcoca commented Mar 16, 2018

SUMMARY

include_vars and set_fact are already updating hostvars in strategy
no need to 're add again' with lower priority the same data.

fixes #37535, mostly by avoiding reprocessing and 'cleaning'

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

facts

ANSIBLE VERSION
2.5/2.6

include_vars and set_fact are already updating hostvars in strategy
no need to 're add again' with lower priority the same data.

fixes ansible#37535, mostly by avoiding reprocessing and 'cleaning'
@bcoca bcoca added this to To Do in 2.5.x blocker list via automation Mar 16, 2018
@ansibot ansibot added bug This issue/PR relates to a bug. needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Mar 16, 2018
@s-hertel s-hertel removed the needs_triage Needs a first human triage before being processed. label Mar 16, 2018
@bcoca bcoca merged commit 3bec76f into ansible:devel Mar 22, 2018
@nitzmahone
Copy link
Member

cherry-picked to stable-2.5 for 2.5.1

@nitzmahone nitzmahone moved this from To Do to Done in 2.5.x blocker list Mar 29, 2018
@NomAnor
Copy link

NomAnor commented Apr 4, 2018

This breaks the following playbook which should output the array ['one', ..., 'four'] instead it outputs ['one', 'four'].

---
- name: test set_fact bug
  hosts: localhost
  connection: local
  gather_facts: no
  vars:
    - dig_list:
      - one

    - digits:
      - two
      - three
      - four
  tasks:

    - name: test bug
      set_fact:
        dig_list: "{{ dig_list + [ digit ] }}"
      with_items: "{{ digits }}"
      loop_control:
        loop_var: digit

    - debug: msg="{{ dig_list }}"

See also #23624. This breaks one of my roles.

@bcoca bcoca deleted the clean_fact_exceptions branch April 4, 2018 20:10
@ansible ansible locked and limited conversation to collaborators Apr 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue/PR relates to a bug. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

set_fact ansible_ssh_common_args fails
6 participants