2020-06-13 05:12:23 +00:00
|
|
|
#!/usr/bin/expect -d
|
|
|
|
|
|
|
|
set timeout -1
|
|
|
|
|
2021-02-27 05:00:52 +00:00
|
|
|
spawn {{ bitwarden_root }}/bitwarden.sh install
|
2020-06-13 05:12:23 +00:00
|
|
|
|
|
|
|
expect "Enter the domain name for your Bitwarden instance (ex. bitwarden.example.com):"
|
|
|
|
send "{{ bitwarden_domain }}\r"
|
|
|
|
|
|
|
|
expect "Do you want to use Let's Encrypt to generate a free SSL certificate? (y/n):"
|
2021-02-27 05:00:52 +00:00
|
|
|
{% if bitwarden_standalone and bitwarden_production %}
|
|
|
|
send "y\r"
|
|
|
|
{% else %}
|
2020-06-13 05:12:23 +00:00
|
|
|
send "n\r"
|
2021-02-27 05:00:52 +00:00
|
|
|
{% endif %}
|
2020-06-13 05:12:23 +00:00
|
|
|
|
2022-05-20 03:19:09 +00:00
|
|
|
expect "Enter the database name for your Bitwarden instance (ex. vault):"
|
|
|
|
send "{{ bitwarden_database }}\r"
|
|
|
|
|
2020-06-13 05:12:23 +00:00
|
|
|
expect "Enter your installation id (get at https://bitwarden.com/host):"
|
|
|
|
send "{{ bitwarden_install_id }}\r"
|
|
|
|
|
|
|
|
expect "Enter your installation key:"
|
|
|
|
send "{{ bitwarden_install_key }}\r"
|
|
|
|
|
|
|
|
expect "Do you have a SSL certificate to use? (y/n):"
|
|
|
|
send "n\r"
|
|
|
|
|
|
|
|
expect "Do you want to generate a self-signed SSL certificate? (y/n):"
|
2021-02-27 05:00:52 +00:00
|
|
|
{% if bitwarden_standalone and not bitwarden_production %}
|
2020-06-13 05:12:23 +00:00
|
|
|
send "y\r"
|
2021-02-27 05:00:52 +00:00
|
|
|
{% else %}
|
|
|
|
send "n\r"
|
|
|
|
{% endif %}
|
2020-06-13 05:12:23 +00:00
|
|
|
|
|
|
|
expect "Next steps, run:\r\n`./bitwarden.sh start`"
|
|
|
|
expect eof
|