ansible doesn't set ansible_ssh_port if it's 22 (the default). Add a filter to do that.
This commit is contained in:
parent
8271b715d8
commit
a6c9ee7ac7
1 changed files with 2 additions and 2 deletions
|
@ -20,11 +20,11 @@
|
|||
|
||||
tasks:
|
||||
- name: run rdiff-backup hitting all the global targets
|
||||
local_action: "shell rdiff-backup --remote-schema 'ssh -p {{ ansible_ssh_port }} -C %s rdiff-backup --server' --create-full-path --print-statistics {{ inventory_hostname }}::{{ item }} /fedora_backups/{{ inventory_hostname }}/`basename {{ item }}` | mail -r sysadmin-backup-members@fedoraproject.org -s 'rdiff-backup: {{ inventory_hostname }}:{{ item }}' sysadmin-backup-members@fedoraproject.org"
|
||||
local_action: "shell rdiff-backup --remote-schema 'ssh -p {{ ansible_ssh_port|default(22) }} -C %s rdiff-backup --server' --create-full-path --print-statistics {{ inventory_hostname }}::{{ item }} /fedora_backups/{{ inventory_hostname }}/`basename {{ item }}` | mail -r sysadmin-backup-members@fedoraproject.org -s 'rdiff-backup: {{ inventory_hostname }}:{{ item }}' sysadmin-backup-members@fedoraproject.org"
|
||||
with_items: global_backup_targets
|
||||
when: global_backup_targets is defined
|
||||
|
||||
- name: run rdiff-backup hitting all the host targets
|
||||
local_action: "shell rdiff-backup --remote-schema 'ssh -p {{ ansible_ssh_port }} -C %s rdiff-backup --server' --exclude='**git-seed*' --exclude='**git_seed' --exclude='**.snapshot' --create-full-path --print-statistics {{ inventory_hostname }}::{{ item }} /fedora_backups/{{ inventory_hostname }}/`basename {{ item }}` | mail -r sysadmin-backup-members@fedoraproject.org -s 'rdiff-backup: {{ inventory_hostname }}:{{ item }}' sysadmin-backup-members@fedoraproject.org"
|
||||
local_action: "shell rdiff-backup --remote-schema 'ssh -p {{ ansible_ssh_port|default(22) }} -C %s rdiff-backup --server' --exclude='**git-seed*' --exclude='**git_seed' --exclude='**.snapshot' --create-full-path --print-statistics {{ inventory_hostname }}::{{ item }} /fedora_backups/{{ inventory_hostname }}/`basename {{ item }}` | mail -r sysadmin-backup-members@fedoraproject.org -s 'rdiff-backup: {{ inventory_hostname }}:{{ item }}' sysadmin-backup-members@fedoraproject.org"
|
||||
with_items: host_backup_targets
|
||||
when: host_backup_targets is defined
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue