0
我的主機在我的主機上配置 - Linux 16.06 LTS,並且我能夠使用ansible windows -m win_ping
命令成功地ping我的服務器。從Ansible在Windows上安裝IIS
現在即時嘗試在我的服務器上安裝IIS。我在我的group_vars文件夾中創建了一個名爲installIIS.yml的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
和IM通過運行YML文件:[email protected]:/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,並且還要檢查windows的更新。
/etc/ansible# tree
.
├── ansible.cfg
├── group_vars
│ ├── installIIS.yml
│ ├── linux.yml
│ └── windows.yml
├── hosts
└── roles
對此有任何幫助或鏈接。先謝謝你。