Answers: <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>
  
Answers: CC BY-SA 4.0
Answers: 2019-04-13T06:56:25.447Z
Answers: 2019-04-13T15:19:28.210Z
Answers: 2019-04-13T15:19:28.210Z
Answers: pxa
Body: <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>
  
Tags: <ansible>
Title: ansible does not play roles and tasks
UserDisplayName: pxa
ThreadText: # 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.
  
  
  ---
  
  