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
Он работает без трех последних строк, но не может с ними:
$ 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 --version
ansible 2.1.2.0
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides
Пожалуйста, помогите!
Спасибо большое !!! – zuba
Действительно. Документация Ansible довольно велика, но это расстраивает, что она часто опережает последнюю версию на несколько месяцев! – rumdrums
@rumdrums Обычно документация модуля содержит узел с версией под заголовком документации модуля. –