Skip to content

Instantly share code, notes, and snippets.

@carlosonunez
Last active June 12, 2020 00:34
Show Gist options
  • Save carlosonunez/876efffb1fbb9e64f447 to your computer and use it in GitHub Desktop.
Save carlosonunez/876efffb1fbb9e64f447 to your computer and use it in GitHub Desktop.
1. No way of reusing task output in main play.
2. Cannot specify multiple fail_when statements.
3. [*] A play is atomic, i.e. I can't take the output from a command, parse its json then act on it. I need to create an intermediary fact containing the json dict then use that in another play. It's tedious.
4. If you're missing a variable in a variable file, Ansible won't fail to parse it. It will just tell you "VARIABLE IS NOT DEFINED!," which is ambiguous
5. Doing anything "complicated" (like looping within a loop for deeply nested Ansible variables) is right out.
6. selectattr doesn't actually do what you think it does!
7. Missing vars within tasks or roles can lead to very very VERY cryptic errors
8. So you can't set booleans with set_facts without casting......... https://github.com/ansible/ansible/issues/5463
9. It would be great if I could say something like:
```
hosts: {{ expr }}
exclude_hosts: {{ expr }}
```
10. It would be nice if Ansible could tell me the last line read when it crashes hard enough to produce a traceback.
11. It doesn't seem like there is a good way of aborting the playbook without it NOT continuing onto other hosts. IOW, Ansible doesn't seem to support `continue`.
12. Some of the error messages are really misleading. For example, this:
`The tasks/main.yml file for the {{ role }} role must contain a set of tasks.`
Could be complaining about one incomplete task definition, EVEN IF IT'S A SINGLE HYPHEN AT THE END OF THE FILE.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment