mirror of
https://github.com/krislamo/vagrant-easyredmine
synced 2024-11-13 23:50:34 +00:00
74 lines
1.7 KiB
Django/Jinja
Executable File
74 lines
1.7 KiB
Django/Jinja
Executable File
#!/usr/bin/expect
|
|
|
|
# EuPathDB wrapper on EasyRedmine installer for
|
|
# non-interactive installs by Ansible
|
|
|
|
set timeout -1
|
|
set KEYUP "\x1B\[A"
|
|
set KEYDOWN "\x1B\[B"
|
|
|
|
spawn redmine install {{ remote_scratch_path }}/{{ installer_package_name }}
|
|
|
|
expect -re {[\r\n]+Path .+ redmine[\s_]root}
|
|
send "{{ redmine_root_dir }}\r"
|
|
|
|
# Database Configuration (arrow-key navigation menu)
|
|
expect -re {What database do you want use}
|
|
send "\r"; # MySQL
|
|
|
|
# no [\n\r] follows the arrow-key navigation menu
|
|
expect -re {[\r\n]*Database: }
|
|
send "{{ redmine_db_name }}\r"
|
|
|
|
expect -re {[\r\n]+Host: }
|
|
send "{{ redmine_db_host }}\r"
|
|
|
|
expect -re {[\r\n]+Username:}
|
|
send "{{ redmine_db_user }}\r"
|
|
|
|
expect -re {[\r\n]+Password:}
|
|
send "{{ redmine_db_password }}\r"
|
|
|
|
expect -re {[\r\n]+Encoding}
|
|
send "{{ redmine_db_encoding }}\r"
|
|
|
|
expect -re {[\r\n]+Port}
|
|
send "{{ redmine_db_port }}\r"
|
|
|
|
# Email sending configuration (arrow-key navigation menu)
|
|
expect -re {Which service to use for email sending}
|
|
send "${KEYUP}${KEYUP}${KEYUP}\r"; # SMTP from scratch
|
|
|
|
# no [\n\r] follows the arrow-key navigation menu
|
|
expect -re {[\r\n]*Username:}
|
|
send "{{ smtp_username }}\r"
|
|
|
|
expect -re {[\r\n]+Password:}
|
|
send "{{ smtp_password }}\r"
|
|
|
|
expect -re {[\r\n]+Address:}
|
|
send "{{ smtp_address }}\r"
|
|
|
|
expect -re {[\r\n]+Port:}
|
|
send "{{ smtp_port }}\r"
|
|
|
|
expect -re {[\r\n]+Domain: }
|
|
send "{{ smtp_domain }}\r"
|
|
|
|
expect -re {[\r\n]+Authentication:}
|
|
send "{{ smtp_authentication }}\r"
|
|
|
|
expect -re {[\r\n]+Openssl verify mode:}
|
|
send "{{ smtp_openssl_verify_mode }}\r"
|
|
|
|
expect -re {[\r\n]+Enable tls}
|
|
send "Y\r"
|
|
|
|
expect -re {[\r\n]+Enable starttls}
|
|
send "Y\r"
|
|
|
|
expect -re {[\r\n]+Would you like to load default data?}
|
|
send "N\r"
|
|
|
|
expect "Redmine was installed"
|