GCE 上的 Ansible 动态清单:找不到成功命令
Ansible dynamic inventory on GCE: success command not found
我正在尝试为动态清单配置我的 Ansible。根据 ansible documentation 我在我的 OS X 笔记本电脑命令行上输入:
GCE_INI_PATH=~/.gce.ini ansible all -i gce.py -m setup hostname | success >> {"ansible_facts": {"ansible_all_ipv4_addresses": ["x.x.x.x"],
我得到:
-bash: success: command not found
close failed in file object destructor:
sys.excepthook is missing
lost sys.stderr
我应该输入什么?
只尝试 运行 命令
GCE_INI_PATH=~/.gce.ini ansible all -i gce.py -m setup
如果这有效,您将获得 JSON 输出流(来自 Ansible setup
模块),显示有关您已设置的任何 GCE 主机的系统信息。
我正在尝试为动态清单配置我的 Ansible。根据 ansible documentation 我在我的 OS X 笔记本电脑命令行上输入:
GCE_INI_PATH=~/.gce.ini ansible all -i gce.py -m setup hostname | success >> {"ansible_facts": {"ansible_all_ipv4_addresses": ["x.x.x.x"],
我得到:
-bash: success: command not found
close failed in file object destructor:
sys.excepthook is missing
lost sys.stderr
我应该输入什么?
只尝试 运行 命令
GCE_INI_PATH=~/.gce.ini ansible all -i gce.py -m setup
如果这有效,您将获得 JSON 输出流(来自 Ansible setup
模块),显示有关您已设置的任何 GCE 主机的系统信息。