Skip to content

Commit

Permalink
Update condition for import ssh_keys tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
vitabaks committed Dec 26, 2023
1 parent 48163c2 commit 2dad38a
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions roles/pgbackrest/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,10 @@
- pgbackrest_repo_host | length > 0
tags: pgbackrest, pgbackrest_conf

# if pgbackrest_repo_type: "posix" and pgbackrest_repo_host is set
# if pgbackrest_repo_host or "backup-standby" is set
- ansible.builtin.import_tasks: ssh_keys.yml
when:
- pgbackrest_repo_type|lower == "posix"
- pgbackrest_repo_host is defined
- pgbackrest_repo_host | length > 0
- not ansible_check_mode
when: (pgbackrest_repo_host is defined and pgbackrest_repo_host | length > 0) or
(pgbackrest_conf.global | json_query("[?option=='backup-standby'].[value=='y']") | length > 0)
tags: pgbackrest, pgbackrest_ssh_keys

- ansible.builtin.import_tasks: cron.yml
Expand Down

0 comments on commit 2dad38a

Please sign in to comment.