diff --git a/group_vars/all/backup.yml b/group_vars/all/backup.yml index 655eea5..182b99e 100644 --- a/group_vars/all/backup.yml +++ b/group_vars/all/backup.yml @@ -1,2 +1,3 @@ --- backup_communication_keys_repository: "https://{{ gitea_admin_username | urlencode() }}:{{ gitea_admin_password | urlencode() }}@{{ shared_service_hostname_gitea }}/gitea-admin/communication-keys.git" +backup_communication_keys_stage_gpg_key: "smardigo_automation_{{ stage }}.gpg.pub" diff --git a/group_vars/stage_demompmx/backup.yml b/group_vars/stage_demompmx/backup.yml new file mode 100644 index 0000000..4fd1718 --- /dev/null +++ b/group_vars/stage_demompmx/backup.yml @@ -0,0 +1,3 @@ +--- +# TODO use stage specific gpg key +backup_communication_keys_stage_gpg_key: "smardigo_automation_prodnso.gpg.pub" diff --git a/roles/maria/tasks/_create_backup.yml b/roles/maria/tasks/_create_backup.yml index 65dc496..448061e 100644 --- a/roles/maria/tasks/_create_backup.yml +++ b/roles/maria/tasks/_create_backup.yml @@ -36,7 +36,7 @@ # there is no ansible gpg module already in place # linting violation needs to be whitelisted - name: "Importing stage specific automation gpg-key" # noqa command-instead-of-shell - shell: 'gpg --import {{ tempdir.path }}/smardigo_automation_{{ stage }}.gpg.pub' + shell: 'gpg --import {{ tempdir.path }}/{{ backup_communication_keys_stage_gpg_key }}' # there is no ansible module already in place for (mariabackup|gpg) # so using shell module diff --git a/roles/postgres/tasks/_create_backup.yml b/roles/postgres/tasks/_create_backup.yml index 151a529..c80bbca 100644 --- a/roles/postgres/tasks/_create_backup.yml +++ b/roles/postgres/tasks/_create_backup.yml @@ -33,7 +33,7 @@ # there is no ansible gpg module already in place # linting violation needs to be whitelisted - name: "Importing stage specific automation gpg-key" # noqa command-instead-of-shell - shell: 'gpg --import {{ tempdir.path }}/smardigo_automation_{{ stage }}.gpg.pub' + shell: 'gpg --import {{ tempdir.path }}/{{ backup_communication_keys_stage_gpg_key }}' # there is no ansible module already in place for (pg_basebackup|gpg) # so using shell module