Skip to content

Commit

Permalink
Add support for installer
Browse files Browse the repository at this point in the history
  • Loading branch information
neidiom committed Apr 25, 2023
1 parent d6408de commit 3ce8575
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
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 @@ -50,7 +50,7 @@

- name: Check if roundcube directory exists
stat:
path: "{{ roundcube_user_home }}/roundcubemail-{{ roundcube_version }}"
path: "{{ roundcube_working_dir }}/roundcubemail-{{ roundcube_version }}"
register: "roundcube_directory"

- name: Get roundcube release
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

0 comments on commit 3ce8575

Please sign in to comment.