mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-17 01:16:44 +02:00
Added no_logs to mailu
This commit is contained in:
parent
2b7950920c
commit
7ffd79ebd9
@ -13,6 +13,7 @@
|
|||||||
)
|
)
|
||||||
changed_when: mailu_user_result.rc == 0
|
changed_when: mailu_user_result.rc == 0
|
||||||
when: "'mail-bot' in item.value.roles or 'administrator' in item.value.roles"
|
when: "'mail-bot' in item.value.roles or 'administrator' in item.value.roles"
|
||||||
|
no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"
|
||||||
|
|
||||||
- name: "Change password for user '{{ mailu_user_key }};{{ mailu_user_name }}@{{ mailu_domain }}'"
|
- name: "Change password for user '{{ mailu_user_key }};{{ mailu_user_name }}@{{ mailu_domain }}'"
|
||||||
command: >
|
command: >
|
||||||
@ -21,6 +22,7 @@
|
|||||||
args:
|
args:
|
||||||
chdir: "{{ mailu_compose_dir }}"
|
chdir: "{{ mailu_compose_dir }}"
|
||||||
when: "'mail-bot' in item.value.roles or 'administrator' in item.value.roles"
|
when: "'mail-bot' in item.value.roles or 'administrator' in item.value.roles"
|
||||||
|
no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"
|
||||||
|
|
||||||
- name: "Create Mailu API Token for {{ mailu_user_name }}"
|
- name: "Create Mailu API Token for {{ mailu_user_name }}"
|
||||||
include_tasks: 03_create-mailu-token.yml
|
include_tasks: 03_create-mailu-token.yml
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
state: present
|
state: present
|
||||||
async: "{{ ASYNC_TIME if ASYNC_ENABLED | bool else omit }}"
|
async: "{{ ASYNC_TIME if ASYNC_ENABLED | bool else omit }}"
|
||||||
poll: "{{ ASYNC_POLL if ASYNC_ENABLED | bool else omit }}"
|
poll: "{{ ASYNC_POLL if ASYNC_ENABLED | bool else omit }}"
|
||||||
|
no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"
|
||||||
|
|
||||||
- name: "Set CNAME record for autoconfig"
|
- name: "Set CNAME record for autoconfig"
|
||||||
community.general.cloudflare_dns:
|
community.general.cloudflare_dns:
|
||||||
@ -29,6 +30,7 @@
|
|||||||
state: present
|
state: present
|
||||||
async: "{{ ASYNC_TIME if ASYNC_ENABLED | bool else omit }}"
|
async: "{{ ASYNC_TIME if ASYNC_ENABLED | bool else omit }}"
|
||||||
poll: "{{ ASYNC_POLL if ASYNC_ENABLED | bool else omit }}"
|
poll: "{{ ASYNC_POLL if ASYNC_ENABLED | bool else omit }}"
|
||||||
|
no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"
|
||||||
|
|
||||||
- name: "Set MX record"
|
- name: "Set MX record"
|
||||||
community.general.cloudflare_dns:
|
community.general.cloudflare_dns:
|
||||||
@ -42,6 +44,7 @@
|
|||||||
state: present
|
state: present
|
||||||
async: "{{ ASYNC_TIME if ASYNC_ENABLED | bool else omit }}"
|
async: "{{ ASYNC_TIME if ASYNC_ENABLED | bool else omit }}"
|
||||||
poll: "{{ ASYNC_POLL if ASYNC_ENABLED | bool else omit }}"
|
poll: "{{ ASYNC_POLL if ASYNC_ENABLED | bool else omit }}"
|
||||||
|
no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"
|
||||||
|
|
||||||
- name: "Set SRV records"
|
- name: "Set SRV records"
|
||||||
community.general.cloudflare_dns:
|
community.general.cloudflare_dns:
|
||||||
@ -63,6 +66,7 @@
|
|||||||
#changed_when: srv_result.rc == 0 and ("An identical record already exists" not in srv_result.stdout)
|
#changed_when: srv_result.rc == 0 and ("An identical record already exists" not in srv_result.stdout)
|
||||||
async: "{{ ASYNC_TIME if ASYNC_ENABLED | bool else omit }}"
|
async: "{{ ASYNC_TIME if ASYNC_ENABLED | bool else omit }}"
|
||||||
poll: "{{ ASYNC_POLL if ASYNC_ENABLED | bool else omit }}"
|
poll: "{{ ASYNC_POLL if ASYNC_ENABLED | bool else omit }}"
|
||||||
|
no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"
|
||||||
|
|
||||||
- name: "Set SPF TXT record"
|
- name: "Set SPF TXT record"
|
||||||
community.general.cloudflare_dns:
|
community.general.cloudflare_dns:
|
||||||
@ -75,6 +79,7 @@
|
|||||||
state: present
|
state: present
|
||||||
async: "{{ ASYNC_TIME if ASYNC_ENABLED | bool else omit }}"
|
async: "{{ ASYNC_TIME if ASYNC_ENABLED | bool else omit }}"
|
||||||
poll: "{{ ASYNC_POLL if ASYNC_ENABLED | bool else omit }}"
|
poll: "{{ ASYNC_POLL if ASYNC_ENABLED | bool else omit }}"
|
||||||
|
no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"
|
||||||
|
|
||||||
- name: "Set DMARC TXT record"
|
- name: "Set DMARC TXT record"
|
||||||
community.general.cloudflare_dns:
|
community.general.cloudflare_dns:
|
||||||
@ -87,6 +92,7 @@
|
|||||||
state: present
|
state: present
|
||||||
async: "{{ ASYNC_TIME if ASYNC_ENABLED | bool else omit }}"
|
async: "{{ ASYNC_TIME if ASYNC_ENABLED | bool else omit }}"
|
||||||
poll: "{{ ASYNC_POLL if ASYNC_ENABLED | bool else omit }}"
|
poll: "{{ ASYNC_POLL if ASYNC_ENABLED | bool else omit }}"
|
||||||
|
no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"
|
||||||
|
|
||||||
- name: "Set DKIM TXT record"
|
- name: "Set DKIM TXT record"
|
||||||
community.general.cloudflare_dns:
|
community.general.cloudflare_dns:
|
||||||
@ -98,4 +104,5 @@
|
|||||||
ttl: 1
|
ttl: 1
|
||||||
state: present
|
state: present
|
||||||
async: "{{ ASYNC_TIME if ASYNC_ENABLED | bool else omit }}"
|
async: "{{ ASYNC_TIME if ASYNC_ENABLED | bool else omit }}"
|
||||||
poll: "{{ ASYNC_POLL if ASYNC_ENABLED | bool else omit }}"
|
poll: "{{ ASYNC_POLL if ASYNC_ENABLED | bool else omit }}"
|
||||||
|
no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"
|
@ -1,7 +1,7 @@
|
|||||||
- name: Check if DKIM private key file exists in the antispam container
|
- name: Check if DKIM private key file exists in the antispam container
|
||||||
command: >
|
command: >
|
||||||
docker compose exec -T antispam
|
docker compose exec -T antispam
|
||||||
test -f {{mailu_dkim_key_path}}
|
test -f {{ mailu_dkim_key_path }}
|
||||||
register: dkim_key_file_stat
|
register: dkim_key_file_stat
|
||||||
failed_when: false
|
failed_when: false
|
||||||
changed_when: false
|
changed_when: false
|
||||||
@ -16,6 +16,7 @@
|
|||||||
when: dkim_key_file_stat.rc != 0
|
when: dkim_key_file_stat.rc != 0
|
||||||
args:
|
args:
|
||||||
chdir: "{{ docker_compose.directories.instance }}"
|
chdir: "{{ docker_compose.directories.instance }}"
|
||||||
|
no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"
|
||||||
|
|
||||||
- name: Fetch DKIM private key from antispam container
|
- name: Fetch DKIM private key from antispam container
|
||||||
shell: >
|
shell: >
|
||||||
@ -26,6 +27,7 @@
|
|||||||
register: dkim_priv_content
|
register: dkim_priv_content
|
||||||
failed_when: dkim_priv_content.rc != 0
|
failed_when: dkim_priv_content.rc != 0
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"
|
||||||
|
|
||||||
- name: Generate DKIM public key on the host
|
- name: Generate DKIM public key on the host
|
||||||
command: openssl rsa -pubout
|
command: openssl rsa -pubout
|
||||||
@ -33,6 +35,7 @@
|
|||||||
stdin: "{{ dkim_priv_content.stdout }}"
|
stdin: "{{ dkim_priv_content.stdout }}"
|
||||||
register: dkim_pub_raw
|
register: dkim_pub_raw
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"
|
||||||
|
|
||||||
- name: Normalize and build Mailu DKIM TXT record
|
- name: Normalize and build Mailu DKIM TXT record
|
||||||
set_fact:
|
set_fact:
|
||||||
@ -43,7 +46,10 @@
|
|||||||
| regex_replace('-----END PUBLIC KEY-----', '')
|
| regex_replace('-----END PUBLIC KEY-----', '')
|
||||||
| regex_replace('\s+', '')
|
| regex_replace('\s+', '')
|
||||||
}}
|
}}
|
||||||
|
no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"
|
||||||
|
|
||||||
- name: Debug Mailu DKIM public key
|
- name: Debug Mailu DKIM public key
|
||||||
debug:
|
debug:
|
||||||
msg: "Mailu DKIM public key: {{ mailu_dkim_public_key }}"
|
msg: "Mailu DKIM public key: {{ mailu_dkim_public_key }}"
|
||||||
|
when: MODE_DEBUG | bool
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user