From 64ebaa67d036f8a48ba1c287b8078ca61941cfbe Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sun, 30 May 2021 21:30:03 +0100 Subject: [PATCH] Setup email for gitlab Not super useful, but nice to enable it --- ansible/roles/gitlab/files/gitlab.rb | 11 +++++++++++ ansible/roles/gitlab/vars/main.yml | 14 ++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/ansible/roles/gitlab/files/gitlab.rb b/ansible/roles/gitlab/files/gitlab.rb index a9c3f44..363e4e1 100644 --- a/ansible/roles/gitlab/files/gitlab.rb +++ b/ansible/roles/gitlab/files/gitlab.rb @@ -23,3 +23,14 @@ gitlab_rails['gitlab_default_theme'] = 2 nginx['real_ip_header'] = 'X-Forwarded-For' nginx['real_ip_trusted_addresses'] = ['{{ pve_hosts.pve_docker.ip }}/32'] gitlab_rails['trusted_proxies'] = ['{{ pve_hosts.pve_docker.ip }}/32'] + +# SMTP +gitlab_rails['smtp_enable'] = true +gitlab_rails['smtp_address'] = "smtp.fastmail.com" +gitlab_rails['smtp_port'] = 465 +gitlab_rails['smtp_user_name'] = "{{ gitlab_smtp_user }}" +gitlab_rails['smtp_password'] = "{{ gitlab_smtp_password }}" +gitlab_rails['smtp_enable_starttls_auto'] = true +gitlab_rails['smtp_tls'] = true +gitlab_rails['smtp_openssl_verify_mode'] = 'peer' +gitlab_rails['gitlab_email_from'] = "{{ gitlab_smtp_user }}" diff --git a/ansible/roles/gitlab/vars/main.yml b/ansible/roles/gitlab/vars/main.yml index ed244a9..4b79dc8 100644 --- a/ansible/roles/gitlab/vars/main.yml +++ b/ansible/roles/gitlab/vars/main.yml @@ -1,2 +1,16 @@ gitlab_config_template: files/gitlab.rb gitlab_create_self_signed_cert: false +gitlab_smtp_password: !vault | + $ANSIBLE_VAULT;1.1;AES256 + 65613432613564643737373038393834363865356139636239393635373437323730646166366539 + 3264306365663964383364643530313731356565393364310a333364396164303933383364323564 + 32653239623662306437383332376233633764303131613733646661316261373130363763623064 + 3832323835653964620a393264353864393066303264343438336665626266643338666564386532 + 62626366343236623337353566623764653633356435623961623835313462343632 +gitlab_smtp_user: !vault | + $ANSIBLE_VAULT;1.1;AES256 + 65643234353935653465613934373736643931396363303734336233393335346431373136356630 + 3234363436383761346135613039353562643438306532630a383937346662306538623533623430 + 34346434653530613764626661396463323634336365653232616661306437333034313137316231 + 6465396332383363320a316632306261363964623263626539373037366638323834623533366335 + 39383566353935353066306139626337643165333161653430393137323438623132