0
當我運行ansible-playbook web_db.yaml
我得到ansible-劇本:ERROR:提供主機列表爲空
ERROR: provided hosts list is empty
任何想法,爲什麼?
一些額外的信息:
$ ls -l
-rw-r--r-- 1 vagrant vagrant 100 Aug 4 14:55 ansible.cfg
-rw-rw-r-- 1 vagrant vagrant 222 Oct 20 2016 inventory
-rw-rw-r-- 1 vagrant vagrant 531 May 3 11:58 web_db.yaml
$ pwd
/home/vagrant/exercise1/production
$ cat inventory
web1 ansible_ssh_host=192.168.33.20
[webservers]
web1
$ cat ansible.cfg
[defaults]
inventory = /home/vagrant/exercise1/production/inventory
host_key_checking = False
$ ansible --version
ansible 1.5.4
$ cat web_db.yaml
---
- hosts: webservers
sudo: yes
你的負面版本真的很老... –