2017-07-27 4 views
0

Meine Antwort ist auf meinem Host-Computer - Linux 16.06 LTS konfiguriert und ich bin erfolgreich in der Lage, meinen Server mit dem Befehl ansible windows -m win_ping ping.Installation von IIS unter Windows von Ansible

Jetzt versuche ich IIS auf meinem Server zu installieren. Ich habe eine YAML-Datei in meinem group_vars-Ordner namens installIIS.yml erstellt. i empfangen wird,

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 

Jede Hilfe bezüglich dieser [email protected]:/etc/ansible# ansible-playbook group_vars/installIIS.yml

und den Fehler:

--- 
- 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 

und im die yml Datei ausgeführt wird. Ich möchte auch Antivirus installieren, stolpern und auch nach Windows-Updates von Ansible suchen.

/etc/ansible# tree 
. 
├── ansible.cfg 
├── group_vars 
│   ├── installIIS.yml 
│   ├── linux.yml 
│   └── windows.yml 
├── hosts 
└── roles 

Alle Hilfe oder Links für diese. Vielen Dank im Voraus.

Antwort

1

Ich denke, das Problem ist die Einzugsebene, wo Sie die Optionen für win_feature angeben. Die Optionen sollten unter dem win_feature Modul eingerückt werden, im Gegensatz zu auf der gleichen Ebene.

Beispiel:

--- 
- 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 
Verwandte Themen