<p>If instead of using the command line:<br>
<code>ansible-playbook -u root --private -key ~ / .ssh / id_rsa centos7.yml -i xxx.xxx.xxx.xxx</code>,  </p>

<p>I use: </p>

<p><code>ansible-playbook -u root centos7.yml -i xxx.xxx.xxx.xxx</code>, </p>

<p>It works.</p>

CC BY-SA 4.0
2019-04-13T06:56:25.447Z
2019-04-13T15:19:28.210Z
2019-04-13T15:19:28.210Z
pxa
<p>I'm learning ansible and I'm having a problem, when I run my playbook, it only runs the gather_fact task and does not play my roles.  On the other hand when I run just a module with the ansible command -m or playing the playbook locally, there my roles are played. Do you have an idea ? I posted the question on the google group, but for the moment no answers. thank you in advance</p>

<ansible>
ansible does not play roles and tasks
pxa
# ansible does not play roles and tasks

(Asked by: username_0 on 2019-04-10)

I'm learning ansible and I'm having a problem, when I run my playbook, it only runs the gather\_fact task and does not play my roles. On the other hand when I run just a module with the ansible command -m or playing the playbook locally, there my roles are played. Do you have an idea ? I posted the question on the google group, but for the moment no answers. thank you in advance

**Tags:** ansible


---

## 1 answers

### Answer by username_0 on 2019-04-13. Score: 1 | Accepted answer

If instead of using the command line:  
`ansible-playbook -u root --private -key ~ / .ssh / id_rsa centos7.yml -i xxx.xxx.xxx.xxx`,

I use:

`ansible-playbook -u root centos7.yml -i xxx.xxx.xxx.xxx`,

It works.


---

