I want to have a set of git repositories with basic applications for loading applications into them, so that everything I need to do with any virtual machine, regardless of its name or role or how long it has been around, to get the basic configuration set to run the ansible command -pull against this repo and I get a ready-to-use instance. The problem I am facing is that if I have a playbook local.yml that looks like this:
- hosts: localhost
connection: local
gather_facts: yes
user: root
[...]
or so:
- hosts: all
connection: local
gather_facts: yes
user: root
[...]
I keep getting the following error:
Starting ansible-pull at 2015-06-09 15:04:05
localhost | success >> {
"after": "2e4d1c637170f95dfaa8d16ef56491b64a9f931b",
"before": "d7520ea15baa8ec2c45742d0fd8e209c293c3487",
"changed": true
}
**ERROR: Specified --limit does not match any hosts**
The only way to avoid the error is to create an explicit inventory file with an explicit group name and explicit host names, which then reference the -i flag as follows:
[mygroup]
myhost1
myhost2
- hosts: mygroup
connection: local
gather_facts: yes
user: root
[...]
, , - , , , playbook . ?