tasks or roles not played

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 :

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.