Last active
May 16, 2017 15:17
-
-
Save alexbrand/7ac6ce4b018c60c0386e18bbc09f2a83 to your computer and use it in GitHub Desktop.
Ansible bug: facts are not gathered when using smart fact gathering
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
[defaults] | |
gathering = smart |
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
# This file is in roles/b/tasks/main.yaml | |
--- | |
- command: echo hello! |
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
--- | |
- hosts: all | |
name: "B" | |
roles: | |
- role: b |
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
# This file is in roles/c/tasks/main.yaml | |
--- | |
- command: echo {{ ansible_os_family }} |
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
--- | |
- hosts: all | |
name: "C" | |
roles: | |
- role: c |
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
--- | |
- include: b.yaml | |
when: False | |
- include: c.yaml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment