Skip to content
Open
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
6 changes: 6 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,9 @@ sympa_soap_nginx_snippet: |
sympa_install_odbc_driver: false

sympa_rsyslog_unix_user: "{{ sympa_unix_user }}"

sympa_smime_enabled: false
sympa_smime:
cafile: "{{ sympa_installation_directory}}/list_data/CA/cert.pem"
capath: "{{ sympa_installation_directory}}/list_data/CA"
ssl_cert_dir: "{{ sympa_installation_directory}}/list_data/X509-user-certs"
1 change: 1 addition & 0 deletions osvars/Alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ sympa_gettext_package: gettext-dev
sympa_openssldev_package: libressl-dev
sympa_expatdev_package: expat-dev
sympa_zlibdev_package: zlib-dev
sympa_smime_package: pkgconf
1 change: 1 addition & 0 deletions osvars/Archlinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ sympa_openssldev_package: openssl
sympa_expatdev_package: expat
sympa_xml2dev_package: libxml2
sympa_zlibdev_package: zlib
sympa_smime_package: pkgconf
1 change: 1 addition & 0 deletions osvars/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ sympa_openssldev_package: libssl-dev
sympa_expatdev_package: libexpat1-dev
sympa_xml2dev_package: libxml2-dev
sympa_zlibdev_package: zlib1g-dev
sympa_smime_package: pkg-config

sympa_package_command: /usr/bin/sympa
sympa_package_bin_directory: /usr/lib/sympa/bin
Expand Down
1 change: 1 addition & 0 deletions osvars/FreeBSD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ sympa_cpanm_program: /usr/local/bin/cpanm
sympa_make_package: gmake
sympa_expatdev_package: expat
sympa_zlibdev_package: zlib
sympa_smime_package: pkgconf
1 change: 1 addition & 0 deletions osvars/Gentoo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ sympa_cpanm_package: dev-perl/App-cpanminus
sympa_openssldev_package: libressl-dev
sympa_expatdev_package: expat-dev
sympa_zlibdev_package: zlib-dev
sympa_smime_package: dev-util/pkgconf
1 change: 1 addition & 0 deletions osvars/RedHat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ sympa_openssldev_package: openssl-devel
sympa_expatdev_package: expat-devel
sympa_xml2dev_package: libxml2-devel
sympa_zlibdev_package: zlib-devel
sympa_smime_package: pkgconf

sympa_package_command: /usr/sbin/sympa.pl
sympa_package_bin_directory: /usr/sbin
Expand Down
1 change: 1 addition & 0 deletions osvars/SLES.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ sympa_web_unix_user: nginx

sympa_cpanm_package: perl-App-cpanminus
sympa_openssldev_package: libopenssl-devel
sympa_smime_package: pkg-config
1 change: 1 addition & 0 deletions osvars/Suse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ sympa_cpanm_package: perl-App-cpanminus
sympa_openssldev_package: libopenssl-devel
sympa_expatdev_package: libexpat-devel
sympa_zlibdev_package: zlib-devel
sympa_smime_package: pkg-config
1 change: 1 addition & 0 deletions osvars/Ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ sympa_openssldev_package: libssl-dev
sympa_expatdev_package: libexpat1-dev
sympa_xml2dev_package: libxml2-dev
sympa_zlibdev_package: zlib1g-dev
sympa_smime_package: pkg-config

sympa_rsyslog_unix_user: syslog
sympa_package_command: /usr/bin/sympa
Expand Down
10 changes: 10 additions & 0 deletions tasks/perl-modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
package:
name: "{{ sympa_xml2dev_package }}"

- name: Install S/MIME library
ansible.builtin.package:
name: "{{ sympa_smime_package }}"
when: sympa_smime_enabled

- name: Workaround for XML::LibXML installation problem on CentOS 7
package:
name: perl-XML-LibXML
Expand Down Expand Up @@ -57,5 +62,10 @@
sympa_cpanm_features: "{{ sympa_cpanm_features + ['soap'] }}"
when: sympa_soap_fcgi_enabled

- name: Add SMIME to features if SMIME is enabled
ansible.builtin.set_fact:
sympa_cpanm_features: "{{ sympa_cpanm_features + ['Crypt::SMIME', 'Crypt::OpenSSL::X509'] }}"
when: sympa_smime_enabled

- name: Install Perl modules with cpanm
command: "{{ sympa_cpanm_program }} --notest --installdeps {{ sympa_source_directory }}{% for feature in sympa_cpanm_features %} --with-feature {{ feature }}{% endfor %}"
10 changes: 10 additions & 0 deletions templates/sympa.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,13 @@ merge_feature {{ sympa_config_merge_feature | bool | ternary('on', 'off') }}
mhonarc /usr/local/bin/mhonarc
{% endif %}
process_archive {{ sympa_config_process_archive | bool | ternary('on', 'off') }}

# S/MIME
{% if sympa_smime_enabled %}
cafile {{ sympa_smime.cafile }}
capath {{ sympa_smime.capath }}
{% if sympa_smime.key_passwd is defined %}
key_passwd {{ sympa_smime.key_passwd }}
{% endif %}
ssl_cert_dir {{ sympa_smime.ssl_cert_dir }}
{% endif %}