Skip to content

Instantly share code, notes, and snippets.

@syang
Last active August 29, 2015 14:17
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 syang/376b97b2d37bc688fad6 to your computer and use it in GitHub Desktop.
Save syang/376b97b2d37bc688fad6 to your computer and use it in GitHub Desktop.
- name: run zookeeper server
command: >
docker.io rm "{{ zookeeper_container_name }}";
docker.io run -d
-p "{{ ZOOKEEPER_PORT1 }}:{{ ZOOKEEPER_PORT1 }}"
-p "{{ ZOOKEEPER_PORT2 }}:{{ ZOOKEEPER_PORT2 }}"
-p "{{ ZOOKEEPER_PORT3 }}:{{ ZOOKEEPER_PORT3 }}"
--name "{{ zookeeper_container_name }}"
"{{ ZOOKEEPER_DOCKER_IMAGE_REPO }}"
------
ERROR: Syntax Error while loading YAML script, /Users/shuoy/devops_workspace/ansible_work/mesos_deployment/roles/zookeeper/tasks/Debian.yml
Note: The error may actually appear before this position: line 25, column 3
command: >
docker.io rm "{{ zookeeper_container_name }}" &&
^
We could be wrong, but this one looks like it might be an issue with
missing quotes. Always quote template expression brackets when they
start a value. For instance:
with_items:
- {{ foo }}
Should be written as:
with_items:
- "{{ foo }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment