私はいくつかのホストにAnecessを使ってjavaをインストールしようとしています。 私はexpect
モジュールのいくつかの例を探して、プロンプトに対する回答を提供しました。 私はこの構文は非常に罰金だと思う:エラー!矛盾するアクションステートメント(expect、command)in Ansible
- hosts: datanode
sudo: yes
sudo_user: root
tasks:
- expect:
name: install java jdk 7
command: apt-get install openjdk-7-jdk
responses:
Question:
'Do you want to continue? [Y/n]': 'Y'
しかし、私はansible-playbook file.yml
を実行しようとするとエラーが表示されます。
ERROR! conflicting action statements (expect, command)
The error appears to have been in '/root/scp.yml': line 5, column 5, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
tasks:
- expect:
^here
どこに問題がありますか? (私は有能な2.0.1.0、pexpect、pythonをインストールしました)
ありがとう!
Anipalが文法エラーを明確に投げているときに、構文が "きれい"だと思いますか? – ydaetskcoR