# My playbook is not running

**URL:** <https://forum.ansible.com/t/my-playbook-is-not-running/29235>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [December 10, 2018, 9:36pm UTC](https://forum.ansible.com/t/my-playbook-is-not-running/29235 "2018-12-10T21:36:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fernando\_William](https://avatars.discourse-cdn.com/v4/letter/f/e5b9ba/32.png) [@Fernando\_William](https://forum.ansible.com/u/Fernando_William)\
**Post date:** [December 10, 2018, 9:36pm UTC](https://forum.ansible.com/t/my-playbook-is-not-running/29235/1 "2018-12-10T21:36:11Z")

</div>

Hi, when i try to run a playbok in a docker role, i´m advised about syntax erro.  
someone could help me with my yml?  
the /roles/docker/tasks/main.yml is:

#start

# tasks file for docker

- name: Grant Docker Instalation  
apt: name={{ item }} update\_cache=yes state=present  
with\_items:

- apt-transport-https

- ca-certificates

- curl

- software-properties-common

- apt\_key:

url= “[https://download.docker.com/linux/ubuntu/gpg](https://download.docker.com/linux/ubuntu/gpg)”  
state:present

- apt\_repository:

repo: "deb [arch=amd64] [Index of linux/ubuntu/](https://download.docker.com/linux/ubuntu) {{ ansible$  
state:present

- name: Installing Docker

apt: name=docker-ce update\_cache=yes state=present  
#end

the error is:

ERROR! Syntax Error while loading YAML.

The error appears to have been in ‘/etc/ansible/roles/docker/tasks/main.yml’: line 3, column 1, but may  
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

# tasks file for docker

- name: Grant Docker Instalation  
^ here

---

<div class="post-metadata">

**Author:** ![Apolinar\_Martinez\_Me](https://avatars.discourse-cdn.com/v4/letter/a/eb8c5e/32.png) [@Apolinar\_Martinez\_Me](https://forum.ansible.com/u/Apolinar_Martinez_Me)\
**Post date:** [December 10, 2018, 9:46pm UTC](https://forum.ansible.com/t/my-playbook-is-not-running/29235/2 "2018-12-10T21:46:54Z")

</div>

The first line od yaml file is :

---

<div class="post-metadata">

**Author:** ![goforawalktwice](https://avatars.discourse-cdn.com/v4/letter/g/c5a1d2/32.png) [@goforawalktwice](https://forum.ansible.com/u/goforawalktwice)\
**Post date:** [December 15, 2018, 1:59am UTC](https://forum.ansible.com/t/my-playbook-is-not-running/29235/3 "2018-12-15T01:59:00Z")

</div>

Have found this to be most useful sorting out YAML syntax errors … [https://codebeautify.org/yaml-validator](https://codebeautify.org/yaml-validator)

in your case there were a few errors:

- url= rather than url:
- state:present needs a space after colon

Regards, Straff
