Skip to content

Commit 9d7f58c

Browse files
authored
Escape initial - when passing postgresql_backup_rsync_backup_opts
Fix #44 The above issue only arises in Python's argparse when `postgresql_backup_rsync_backup_opts` is "one word", which is why UseGalaxy.org doesn't see this ( https://github.com/galaxyproject/usegalaxy-playbook/blob/main/env/main/group_vars/dbservers/vars.yml#L8C1-L8C36 ).
1 parent f23cb7a commit 9d7f58c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ __postgresql_pgdg_bin_dir: "{{ '/usr/pgsql-' ~ (postgresql_version | replace('.'
3333
postgresql_backup_command: >-
3434
{{ postgresql_backup_local_dir | quote }}/bin/backup.py
3535
{{ '--rsync-connect-opts ' ~ (postgresql_backup_rsync_connect_opts | quote) if postgresql_backup_rsync_connect_opts else '' }}
36-
--rsync-backup-opts {{ postgresql_backup_rsync_backup_opts | quote }}
36+
--rsync-backup-opts {{ postgresql_backup_rsync_backup_opts | regex_replace('^-', '\-') | quote }}
3737
--keep {{ postgresql_backup_keep | quote }}
3838
{{ '--pg-bin-dir ' ~ __postgresql_pgdg_bin_dir if ansible_os_family == 'RedHat' else '' }}
3939
--backup --clean-archive {{ postgresql_backup_dir | quote }}

0 commit comments

Comments
 (0)