Я создаю доступный сценарий для установки ispconfig
без взаимодействия. Я использую сценарий для ispconfig
интерактивной установки php
. Я устанавливаю его на Ubuntu 14.04
, используя apt-get
версию expect и последнюю версию ansible.
Что случается, что после запуска ожидаемого скрипта ansible не возвращается.
Я использую следующий сценарий: ожидайте скрипт на github < / а>
Результат, который я получаю из ожидаемого файла журнала:
Stopping amavisd: amavisd-new.
Starting amavisd: amavisd-new.
* Stopping ClamAV daemon clamd
...done.
* Starting ClamAV daemon clamd
...done.
dovecot stop/waiting
dovecot start/running, process 30668
reload: Unknown instance:
* Reloading nginx configuration nginx
...done.
Installation completed.
string detected
Когда я запускаю сценарий на удаленных хостах, он работает безупречно. Выполняя это через ansible, скрипт выполняется, но он не возвращается. Запуск ansible с параметром -v не показывает никакой информации журнала, пока ansible ожидает.
Соответствующая часть доступного скрипта:
# as isconfig install is a interactive script we use expect to deal with that
# by checking if ispconfig is present we make this an idempotent process
# if ispconfig absent the install will run
- name: Check for installed ispconfig
command: /usr/bin/test ! -e "/usr/local/ispconfig"
register: ispconfig_absent
ignore_errors: true
- name: Copy expect script to configure ispconfig
template: src=ispconfig.exp dest=/root/ispconfig.exp
when: ispconfig_absent|success
- name: set perm for script to configure ispconfig
file: path=/root/ispconfig.exp mode=0750
when: ispconfig_absent|success
- name: configure ispconfig
command: "/root/ispconfig.exp"
when: ispconfig_absent|success
- name: remove ispconfig configure script
file: path=/root/ispconfig.exp state=absent
when: ispconfig_absent|success
Выполнение ps aux показывает, что ожидаемый сценарий больше не работает. Доступный процесс ожидает возврата процесса.
Есть подсказки, что делать?