Last active
September 28, 2017 13:41
-
-
Save CalvinHartwell/62f6d8d2d6decb88a1c616c1a7669942 to your computer and use it in GitHub Desktop.
Example ansible error with nested when in role
This file contains hidden or 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
| # works fine: | |
| - name: generate kittens to take over the world | |
| hosts: places_where_dogs_reside | |
| gather_facts: yes | |
| roles: | |
| - { role: train-kitten-for-battle, topics: ["whiskers"], partitions: 6, replication: 2} | |
| # does not work: | |
| - name: generate kittens to take over the world | |
| hosts: places_where_dogs_reside | |
| gather_facts: yes | |
| roles: | |
| - { role: train-kitten-for-battle, when: ansible_os_family == "Debian", namespaces: ['fluffy', 'brown','cat'], topics: ["whiskers"], partitions: 6, replication: 2} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment