# tasks or roles not played

**URL:** <https://forum.ansible.com/t/tasks-or-roles-not-played/30072>\
**Category:** Ansible Developer\
**Created:** [April 6, 2019, 8:22am UTC](https://forum.ansible.com/t/tasks-or-roles-not-played/30072 "2019-04-06T08:22:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![philipe.xavier.guino](https://avatars.discourse-cdn.com/v4/letter/p/53a042/32.png) [@philipe.xavier.guino](https://forum.ansible.com/u/philipe.xavier.guino)\
**Post date:** [April 6, 2019, 8:22am UTC](https://forum.ansible.com/t/tasks-or-roles-not-played/30072/1 "2019-04-06T08:22:30Z")

</div>

Hello,

I am new on ansible and learning. I encounter a problem, when I launch my playbook, only the task gathering fact is played. If I pass it to no, nothing is played.

command line without inventory :  
ansible-playbook -u root -t 86700 --private-key ~/.ssh/id\_rsa centos7.yml -i ‘xxx.xxx.xxx.xxx,’

with inventory :  
ansible-playbook -u root -t 86700 --private-key ~/.ssh/id\_rsa centos7.yml -i inventory\_file

result :

ansible-playbook 2.7.9  
config file = /etc/ansible/ansible.cfg  
configured module search path = [u’/home/vagrant/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]  
ansible python module location = /usr/lib/python2.7/site-packages/ansible  
executable location = /usr/bin/ansible-playbook  
python version = 2.7.5 (default, Oct 30 2018, 23:45:53) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]  
Using /etc/ansible/ansible.cfg as config file  
Parsed xxx.xxx.xxx.xxx, inventory source with host\_list plugin

PLAYBOOK: centos7.yml \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
1 plays in centos7.yml

PLAY [Configure server] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
META: ran handlers  
META: ran handlers  
META: ran handlers

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

playbook :

---

<div class="post-metadata">

**Author:** ![philipe.xavier.guino](https://avatars.discourse-cdn.com/v4/letter/p/53a042/32.png) [@philipe.xavier.guino](https://forum.ansible.com/u/philipe.xavier.guino)\
**Post date:** [April 13, 2019, 7:00am UTC](https://forum.ansible.com/t/tasks-or-roles-not-played/30072/2 "2019-04-13T07:00:08Z")

</div>

Hello,

ok, 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.
