2016-10-26 12 views
1

私は演劇で働いています。有効な構文は、ここでおそらく有効な構文の可能性がありません

を訴えてansibleを作る私の脚本です:

- hosts: tcagents 
    tasks: 
    - name: Create temporary dir C:\Tmp\windows-sdk-8.0 
     win_file: path=C:\TMP\windows-sdk-8.0 state=directory 
    - name: Copy windows-sdk-8.0/Windows-SDK-8.0.zip file to temporary dir on a node 
     win_copy: 
     src: Windows-SDK-8.0.zip 
     dest: C:\Tmp\windows-sdk-8.0\Windows-SDK-8.0.zip 
    - name: Unzip C:\TMP\windows-sdk-8.0\Windows-SDK-8.0.zip to C:\TMP\windows-sdk-8.0 
     win_unzip: 
     src: C:\TMP\windows-sdk-8.0\Windows-SDK-8.0.zip 
     dest: C:\TMP\windows-sdk-8.0 
    - win_command: C:\TMP\windows-sdk-8.0\setup.exe /Quiet /NoRestart 
     args: 
     chdir: C:\TMP\windows-sdk-8.0 

それは最後の3行せずに動作しますが、それで失敗します。ここでは

$ ansible-playbook -l windows windows-sdk-8.0/windows-sdk-8.0.yml 
ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path. 

The error appears to have been in '/home/qaexpert/ansible-lab/windows-sdk-8.0/windows-sdk-8.0.yml': line 20, column 7, but may 
be elsewhere in the file depending on the exact syntax problem. 

The offending line appears to be: 

     dest: C:\TMP\windows-sdk-8.0 
    - win_command: C:\TMP\windows-sdk-8.0\setup.exe /Quiet /NoRestart 
    ^here 

はansibleバージョンです:

$ ansible --version 
ansible 2.1.2.0 
    config file = /etc/ansible/ansible.cfg 
    configured module search path = Default w/o overrides 

助けてください!

答えて

3

Ansible win_command バージョン2.2の新機能で、あなたは2.1.2

+0

はどうもありがとうございまし実行しています! – zuba

+0

確かに。 Anabilitiesのドキュメントはかなり素晴らしいですが、それは数ヶ月の間に最新のリリースよりも先行することがしばしばです! – rumdrums

+0

@rumdrums通常、モジュールドキュメントには、モジュールドキュメントの見出しの下にバージョンがあるノードが含まれています。 –

関連する問題