Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for installer #44

Merged
merged 1 commit into from
Apr 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ roundcube_dependencies:
roundcube_carddav_version: 4.4.2

# Installer
roundcube_installer_delete: true
roundcube_enable_installer: false

# Apache
roundcube_apache: true
4 changes: 2 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
group: "{{ roundcube_group }}"
mode: 0750
copy: no
when: (download.changed) or (not roundcube_directory.stat.exists)
when: (download.changed) or (not roundcube_directory.stat.exists) or ( roundcube_enable_installer | bool )

- name: Link to current roundcube release
file:
Expand Down Expand Up @@ -162,4 +162,4 @@
file:
path: "{{ roundcube_working_dir }}/current/installer"
state: absent
when: roundcube_installer_delete | bool
when: ( not roundcube_enable_installer | bool )
18 changes: 18 additions & 0 deletions templates/config/config.inc.php.j2
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,20 @@ $config['db_dsnw'] = 'mysql://{{ roundcube_mysql_user }}:{{ roundcube_mysql_pass
// See defaults.inc.php for the option description.
$config['imap_host'] = '{{ roundcube_imap_host }}';

// ----------------------------------
// LOGGING/DEBUGGING
// ----------------------------------

// log driver: 'syslog', 'stdout' or 'file'.
$config['log_driver'] = 'syslog';

// Syslog ident string to use, if using the 'syslog' log driver.
$config['syslog_id'] = 'roundcube';

// ----------------------------------
// SMTP
// ----------------------------------

// SMTP server host (and optional port number) for sending mails.
// See defaults.inc.php for the option description.
$config['smtp_host'] = '{{ roundcube_smtp_host }}';
Expand All @@ -49,6 +57,16 @@ $config['smtp_user'] = '{{ roundcube_smtp_user }}';
// will use the current user's password for login
$config['smtp_pass'] = '{{ roundcube_smtp_pass }}';

// ----------------------------------
// SYSTEM
// ----------------------------------

{% if roundcube_enable_installer | bool %}
// THIS OPTION WILL ALLOW THE INSTALLER TO RUN AND CAN EXPOSE SENSITIVE CONFIG DATA.
// ONLY ENABLE IT IF YOU'RE REALLY SURE WHAT YOU'RE DOING!
$config['enable_installer'] = {{ (roundcube_enable_installer) | bool | string | lower }};
{% endif %}

// don't allow these settings to be overridden by the user
// (disable skin selection)
$config['dont_override'] = ['skin'];
Expand Down