From cc3d98d893c8c666360b4490ef538a017bd54047 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Mon, 6 Jun 2022 13:09:57 +0200 Subject: [PATCH] srs: install the secret after the first start. --- tasks/postsrsd.yml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/tasks/postsrsd.yml b/tasks/postsrsd.yml index 505babd..724e6f0 100644 --- a/tasks/postsrsd.yml +++ b/tasks/postsrsd.yml @@ -30,15 +30,6 @@ - name: POSTSRSD configuration block: - - name: Install the postsrsd secret - template: - src: postsrsd.secret.j2 - dest: '{{ postfix_srs_conf_file }}' - mode: 0440 - owner: '{{ postfix_srs_user }}' - group: 'root' - notify: restart postsrsd - - name: Install the postsrsd configuration file template: src: 'postsrsd.default.j2' @@ -59,3 +50,16 @@ enabled: true tags: ['postfix', 'postfix_postsrsd', 'postsrsd'] + +- name: POSTSRSD secret + block: + - name: Install the postsrsd secret. After the first start of the service + template: + src: postsrsd.secret.j2 + dest: '{{ postfix_srs_conf_file }}' + mode: 0440 + owner: '{{ postfix_srs_user }}' + group: 'root' + notify: restart postsrsd + + tags: ['postfix', 'postfix_postsrsd', 'postsrsd', 'postfix_conf', 'postsrsd_conf']