2017-07-31 97 views
0

当我执行与主机组运行ansible剧本 - 无需主机匹配

ansible -i /home/linux/ansible/my-prereqs/hosts -m ping 'test' 


172.16.57.101 | SUCCESS => { 
    "changed": false, 
    "ping": "pong" 
} 

我的主机清单文件位于/home/linux/ansible/my-prereqs/hosts

我的库存文件就像下面

[ansible-vm] 
172.16.57.102 

**[test]** 
172.16.57.101 

现在我想运行一本游戏书,但我无法通过库存组运行它们

ansible-playbook -i /home/linux/ansible/my-prereqs/hosts -l test my-prereqs.yaml 

but I get the following 


PLAY *************************************************************************** 
skipping: no hosts matched 

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

我在这里想念我的论点是什么?

+0

什么是你的剧本了'hosts'指令不同? –

+0

完美只是想出了你的指针......这是从库存文件组名称它的工作不同谢谢@KonstantinSuvorov –

回答

-1

从注释答:

什么是你的剧本hosts指令?

...

这是从清单文件组名

相关问题