diff --git a/defaults/main.yml b/defaults/main.yml index 19fda6f..22c769b 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -11,10 +11,18 @@ lacre_homedir: '/var/lib/gpg-lacre' lacre_backend_deploy: 'true' lacre_webgate_deploy: 'true' lacre_apt: - - 'python3-m2crypto' - 'git' - 'gnupg' - 'sudo' + - 'python3-pip' + - 'python3-dev' + - 'libssl-dev' + - 'swig' +lacre_pip_pkgs: + - 'setuptools' + - 'wheel' + - 'pip' + - 'pyyaml' lacre_daemon: 'false' lacre_set_content_filter: 'true' lacre_content_filter: 'gpg-mailgate' @@ -42,7 +50,7 @@ lacre_logfile: '/etc/gpg-lacre-logging.conf' lacre_max_data_bytes: '33554432' lacre_log_headers: 'no' lacre_relay: '127.0.0.1' -lacre_port: '10028' +lacre_relay_port: '10028' lacre_enc_port: '25' lacre_starttls: 'no' diff --git a/tasks/install.yml b/tasks/install.yml index b4e1535..69436b6 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -27,6 +27,16 @@ owner: '{{ lacre_username }}' group: '{{ lacre_group }}' mode: '700' + +- name: '[Install] - Create a symbolic link to python binary' + file: + src: '/usr/bin/python3.9' + dest: '/usr/bin/python' + state: 'link' + +- name: '[INSTALL] - Install lacre backend requirenments' + pip: + requirements: "{{ lacre_app_dir }}/requirements.txt" - name: '[Install] - Link GnuPG Lacre to global python modules' file: diff --git a/tasks/webgate.yml b/tasks/webgate.yml index 6be11f2..02e3ef0 100644 --- a/tasks/webgate.yml +++ b/tasks/webgate.yml @@ -10,8 +10,13 @@ dest: '{{ lacre_webgate_dir }}' force: 'yes' version: '{{ lacre_webgate_version }}' - become: 'yes' - become_user: '{{ lacre_webgate_user }}' + # become: 'yes' + #become_user: '{{ lacre_webgate_user }}' +- name: '[Lacre-webgate] - Make sure webgate is owned by lacre user' + file: + path: '{{ lacre_webgate_dir }}' + owner: '{{ lacre_username }}' + group: '{{ lacre_group }}' - name: '[Lacre-webgate] - Check if db schema is loaded' shell: diff --git a/templates/etc/gpg-mailgate.conf.j2 b/templates/etc/gpg-mailgate.conf.j2 index cdcd918..fada764 100644 --- a/templates/etc/gpg-mailgate.conf.j2 +++ b/templates/etc/gpg-mailgate.conf.j2 @@ -69,7 +69,7 @@ log_headers = {{ lacre_log_headers }}no # gpg-mailgate will submit email to this relay after it is done processing # unless you alter the default Postfix configuration, you won't have to modify this host = {{ lacre_relay }} -port = {{ lacre_port }} +port = {{ lacre_relay_port }} # This is the default port of postfix. It is used to send some # mails through the GPG-Mailgate so they are encrypted enc_port = {{ lacre_enc_port }}