【发布时间】:2017-07-27 08:47:20
【问题描述】:
我的 ansible 已在我的主机上配置 - Linux 16.06 LTS,我可以使用 ansible windows -m win_ping 命令成功地 ping 我的服务器。
现在我正在尝试在我的服务器上安装 IIS。我在名为 installIIS.yml 的 group_vars 文件夹中创建了一个 YAML 文件。
---
- name: Install IIS
hosts: windows
gather_facts: true
tasks:
- win_feature:
name: "windows"
state: present
restart: yes
include_sub_features: yes
include_management_tools: yes
我通过以下方式运行 yml 文件:root@SAUPRDSVR01:/etc/ansible# ansible-playbook group_vars/installIIS.yml
我收到的错误是
ERROR! 'include_sub_features' is not a valid attribute for a Task
The error appears to have been in '/etc/ansible/group_vars/installIIS.yml': line 6, column 6, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
tasks:
- win_feature:
^ here
有关此的任何帮助。我还想安装防病毒软件、tripwire 并从 ansible 检查 Windows 更新。
/etc/ansible# tree
.
├── ansible.cfg
├── group_vars
│ ├── installIIS.yml
│ ├── linux.yml
│ └── windows.yml
├── hosts
└── roles
任何帮助或链接。先感谢您。
【问题讨论】:
标签: linux windows ansible yaml