我正在使用anisble在我的机器上安装rubyencoder。但是我遇到expect
模块的问题。在安装软件期间,我需要回答12次相同的问题。
下面是我的书:
---
- hosts: test1
become: true
tasks:
- name: download rubyencoder tar file
unarchive: src=https://www.rubyencoder.com/download.html?cm_id=151&action=download_file&id=c24f411ff92127c01f610f67e8a09aae dest=/home/dagar/rubyencoder copy=no
- name: run command to install rubyencoder
become: yes
become_user: dagar
expect:
chdir: /home/dagar/rubyencoder/rubyencoder-evaluation/bin
command: /home/dagar/rubyencoder/rubyencoder-evaluation/bin/rubyencoder
responses:
'Press return key to continue...': "\n"
'Press return key to continue...': "\n"
'Press return key to continue...': "\n"
'Press return key to continue...': "\n"
'Press return key to continue...': "\n"
'Press return key to continue...': "\n"
'Press return key to continue...': "\n"
'Press return key to continue...': "\n"
'Press return key to continue...': "\n"
'Press return key to continue...': "\n"
'Press return key to continue...': "\n"
'Press return key to continue...': "\n"
'type "I AGREE":': 'I AGREE'
'Your RubyEncoder profile e-mail:': 'abc@gmail.com'
'Your RubyEncoder profile password:': "\n"
我已通过Press return key to continue...
12次,因为安装要求12次。但是,当我运行剧本时,似乎只一次通过消息duplicate entry and will consider only single time
来考虑它,甚至一次都无法正常工作,这似乎是很不切实际的。我遇到了以下错误:
Press return key to continue...
在这个问题上,您能帮我吗?
谢谢。