2015-11-12 04:14:03 +00:00
|
|
|
#!/usr/bin/expect
|
|
|
|
|
|
|
|
# EuPathDB wrapper on EasyRedmine installer for
|
|
|
|
# non-interactive installs by Ansible
|
|
|
|
|
|
|
|
set timeout -1
|
|
|
|
|
2016-08-26 15:55:58 +00:00
|
|
|
spawn redmine install {{ remote_scratch_path }}/{{ installer_package_name }}
|
2015-11-12 04:14:03 +00:00
|
|
|
|
|
|
|
expect -re {[\r\n]+Path for redmine_root}
|
|
|
|
send "{{ redmine_root_dir }}\r"
|
|
|
|
|
|
|
|
# Database Configuration
|
|
|
|
expect -re {[\r\n]+> }
|
|
|
|
send "1\r"; # MySQL
|
|
|
|
|
|
|
|
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
|
|
|
|
expect -re {[\r\n]+> }
|
2015-11-30 15:08:24 +00:00
|
|
|
send "3\r"; # SMTP from scratch
|
2015-11-12 04:14:03 +00:00
|
|
|
|
2015-11-30 15:08:24 +00:00
|
|
|
expect -re {[\r\n]+Address:}
|
|
|
|
send "{{ smtp_address }}\r"
|
2015-11-12 04:14:03 +00:00
|
|
|
|
2015-11-30 15:08:24 +00:00
|
|
|
expect -re {[\r\n]+Port }
|
|
|
|
send "{{ smtp_port }}\r"
|
|
|
|
|
|
|
|
expect -re {[\r\n]+Domain: }
|
|
|
|
send "{{ smtp_domain }}\r"
|
|
|
|
|
|
|
|
expect -re {[\r\n]+User_name:}
|
|
|
|
send "{{ smtp_username }}\r"
|
|
|
|
|
|
|
|
expect -re {[\r\n]+Password:}
|
|
|
|
send "{{ smtp_password }}\r"
|
|
|
|
|
|
|
|
expect -re {[\r\n]+Authentication:}
|
|
|
|
send "{{ smtp_authentication }}\r"
|
|
|
|
|
|
|
|
expect -re {[\r\n]+Enable_starttls_auto:}
|
|
|
|
send "{{ smtp_enable_starttls }}\r"
|
|
|
|
|
2016-08-24 02:18:43 +00:00
|
|
|
expect {
|
|
|
|
-re {[\r\n]+-- } {exp_continue}
|
|
|
|
-re {[\r\n]+Do you want repeat this command?} {send "yes\n"; exp_continue}
|
|
|
|
-re {[\r\n]+Done.}
|
|
|
|
}
|
|
|
|
|
2015-11-30 15:08:24 +00:00
|
|
|
# # Email sending configuration
|
|
|
|
# expect -re {[\r\n]+> }
|
|
|
|
# send "1\r"; # GMail
|
2016-08-24 02:18:43 +00:00
|
|
|
#
|
2015-11-30 15:08:24 +00:00
|
|
|
# expect -re {[\r\n]+User_name:}
|
|
|
|
# send "{{ smtp_username }}\r"
|
2016-08-26 15:55:58 +00:00
|
|
|
#
|
2015-11-30 15:08:24 +00:00
|
|
|
# expect -re {[\r\n]+Password:}
|
|
|
|
# send "{{ smtp_password }}\r"
|
2015-11-12 04:14:03 +00:00
|
|
|
|
|
|
|
# What web-server do you want
|
|
|
|
expect -re {[\r\n]+> }
|
|
|
|
send "4\r"; # Passenger (nginx)
|
|
|
|
|
|
|
|
interact
|