Created
July 2, 2017 15:37
-
-
Save imax9000/72badd30384149ac41cae2127fcb5bec to your computer and use it in GitHub Desktop.
How to break Ansible
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
% ansible-playbook test.yml | |
[WARNING]: Host file not found: .../homebrew/etc/ansible/hosts | |
[WARNING]: provided hosts list is empty, only localhost is available | |
PLAY [Fuck this shit] ********************************************************** | |
TASK [setup] ******************************************************************* | |
ok: [localhost] | |
TASK [command] ***************************************************************** | |
changed: [localhost] | |
TASK [debug] ******************************************************************* | |
fatal: [localhost]: FAILED! => {"failed": true, "msg": "{u'cmd': u\"echo '{{}}' > /dev/null\", u'end': u'2017-07-02 16:35:55.922241', u'stdout': u'', u'changed': True, u'start': u'2017-07-02 16:35:55.914838', u'delta': u'0:00:00.007403', u'stderr': u'', u'rc': 0, 'stdout_lines': [], u'warnings': []}: template error while templating string: Expected an expression, got 'end of print statement'. String: echo '{{}}' > /dev/null"} | |
to retry, use: --limit @.../test.retry | |
PLAY RECAP ********************************************************************* | |
localhost : ok=2 changed=1 unreachable=0 failed=1 |
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
- name: Fuck this shit | |
hosts: localhost | |
tasks: | |
- shell: echo '{{"{{}}"}}' > /dev/null | |
register: foo | |
- debug: msg="{{ foo.stdout }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment