ERROR! conflicting action statements (expect, command) in Ansible
问题 I'm trying to install java on several hosts with Ansible. I looked for some examples of expect module to provide answers to the prompts. I think this syntax is quite fine: - 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' But when I try to execute ansible-playbook file.yml I receive the error: ERROR! conflicting action statements (expect, command) The error