Hi Kunal, I don't have a machine to confirm, but I guess there is a syntax error in your playbook. A new block should have two spaces of indentation. Try to make that change and see.
Regards, Vikas On Sunday, 18 October 2015 09:08:11 UTC+11, Kunal Pariani wrote: > > Hello, > I mm new to Ansible and trying to use its docker module to start docker > containers. I have all the prereqs installed on the docker host > > > - python >= 2.6 > - docker-py >= 0.3.0 > - The docker server >= 0.10.0 > > But i get a syntax error while trying to run the ansible playbook. No clue > why its throwing that error. Any ideas on what am i missing here ? > > $ ansible-playbook -vvvv -i hosts ../wildfly-docker.yml > ERROR: Syntax Error while loading YAML script, ../wildfly-docker.yml > Note: The error may actually appear before this position: line 7, column 5 > > docker: > name: wildfly-1 > ^ > > > Here is my playbook file > ----------------------------- > --- > - hosts: docker > sudo: yes > tasks: > - name: Wildfly container#1 > docker: > name: wildfly-1 > image: jboss/wildfly > state: reloaded > pull: always > ports: > - "8081:8080" > - "9991:9990" > > - name: Wildfly container#2 > docker: > name: wildfly-2 > image: jboss/wildfly > state: reloaded > pull: always > ports: > - "8082:8080" > - "9992:9990" > > Thanks > > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/70a3ccd9-df9e-4b94-ac57-3c74ce2e6edd%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
