[WARNING]: Could not match supplied host pattern ansible 2.7.6

20 views
Skip to first unread message

lalo andres

unread,
Feb 11, 2019, 1:37:07 PM2/11/19
to Ansible Project
Hello community,
I am trying to generate a playbook using roles, but at the moment of executing the playbook it does not recognize the inventory hosts and does not execute the ROL

My structure:

Capture.PNG















my inventorie .yml:

win-mssql:
 hosts:



deploy_win_mssql.yml:

---
- name: Install SQL Server
  hosts: win_mssql

  roles:
   - roles/mssql/setup


main.yml:

---
#---- Instalcion de SQL segun version ---
- include_tasks: "setup-sql-2016.yml"



command to execute:

 ansible-playbook /etc/ansible/deploy_win_mssql.yml -i /etc/ansible/_inventories/staging/eco-sql-dev.ini -e @/etc/ansible/_creds/dev-creds.yml --vault-password-file /etc/ansible_pass -vvvv

Error :

PLAYBOOK: deploy_win_mssql.yml ************************************************************
1 plays in /etc/ansible/deploy_win_mssql.yml
 [WARNING]: Could not match supplied host pattern, ignoring: win_mssql


PLAY [Install SQL Server] *****************************************************************
skipping: no hosts matched

PLAY RECAP ********************************************************************************


Indian Velumani

unread,
Feb 11, 2019, 1:42:37 PM2/11/19
to ansible...@googlegroups.com
Hi Dude, 

It is name mismatch problem in hosts file it is *win-mssql* and in  yml it's *win_mssql*


--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/d72d4632-3dca-47b7-9329-857d928ea13a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Capture.PNG

lalo andres

unread,
Feb 11, 2019, 2:03:57 PM2/11/19
to Ansible Project
Thank's my fault its work!!!!
Reply all
Reply to author
Forward
0 new messages