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

Check variables used in 'When' clause is not changed in the tasks in a block #140

Open
Tomorrow9 opened this issue Sep 10, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@Tomorrow9
Copy link
Member

Take a look at the playbooks to avoid below situation.

- set_fact:
      test: true
- block:
      - debug: var=test
      - set_fact:
            test: false
      - debug: var=test
   when: test
- debug:
       msg: "The above second debug will not run."
   when: not test
@Tomorrow9 Tomorrow9 added the enhancement New feature or request label Sep 10, 2021
@Tomorrow9 Tomorrow9 pinned this issue Sep 10, 2021
@Winnie81 Winnie81 unpinned this issue Mar 10, 2023
@Tomorrow9 Tomorrow9 pinned this issue Mar 15, 2023
@linhuali linhuali unpinned this issue May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant