infra-prod: don't encrypt logs if they are being published

If this flag is set, the logs are copied into the published job.
There's no need to save an encrypted copy of the same thing.

Change-Id: I32ac5e0ac4d2307f2e1df88c5e2ccbe2fd381839
This commit is contained in:
Ian Wienand 2023-01-12 15:58:12 +11:00
parent 00f6d27561
commit 03e59aa981
No known key found for this signature in database
1 changed files with 3 additions and 1 deletions

View File

@ -5,7 +5,9 @@
- hosts: prod_bastion[0]
tasks:
- name: Encrypt log
when: infra_prod_playbook_encrypt_log|default(False)
when: >
infra_prod_playbook_encrypt_log|default(False) and
(not infra_prod_playbook_collect_log)
block:
- name: Create temporary staging area for encrypted logs