Skip to content

Instantly share code, notes, and snippets.

@ateoto
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ateoto/758b4a1f16793270e608 to your computer and use it in GitHub Desktop.
Save ateoto/758b4a1f16793270e608 to your computer and use it in GitHub Desktop.
Template Error in 1.8
---
- hosts: all
tasks:
- name: Determining database status
shell: "docker inspect --format '{% raw %}{{ .State.Running }}{% endraw %}' mongodb"
register: db_up
- debug: var=db_up
PLAY [all] ********************************************************************
GATHERING FACTS ***************************************************************
ok: [topbox-cd]
TASK: [Determining database status] *******************************************
changed: [topbox-cd]
TASK: [debug var=db_up] *******************************************************
fatal: [topbox-cd] => template error while templating string: unexpected '.'
FATAL: all hosts have already failed -- aborting
PLAY RECAP ********************************************************************
to retry, use: --limit @/Users/mmccants/backup.retry
topbox-cd : ok=2 changed=1 unreachable=1 failed=0
ubuntu@ip-0-0-0-0:~$ docker inspect --format '{{ .State.Running }}' mongodb
true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment