Changeset - 1ac4be13293b
[Not reviewed]
0 2 0
Branko Majic (branko) - 4 years ago 2020-01-06 15:31:45
branko@majic.rs
MAR-148: Fix Ansible warnings for the backup_client role:

- Use length filter to check if optional parameter lists have been
supplied.
- Quote the crontab trigger times to avoid implicit conversion from
integer to string.
2 files changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
roles/backup_client/handlers/main.yml
Show inline comments
 
@@ -20,4 +20,4 @@
 

	
 
- name: Import public keys
 
  command: "{{ gnupg_binary }} --no-tty --homedir /etc/duply/main/gnupg --import /etc/duply/main/public_keys.asc"
 
  when: backup_additional_encryption_keys
 
  when: backup_additional_encryption_keys | length > 0
roles/backup_client/tasks/main.yml
Show inline comments
 
@@ -66,7 +66,7 @@
 
    sed -e 's/.*: //' | sort -u | sed -re 's/^.{{ '{' + gnupg_key_cutoff + '}' }}//' | tr '\n' ',' | sed -e 's/,$//'"
 
  args:
 
    executable: /bin/bash
 
  when: backup_additional_encryption_keys
 
  when: backup_additional_encryption_keys | length > 0
 
  register: backup_additional_encryption_keys_ids
 
  changed_when: false
 
  failed_when: not backup_additional_encryption_keys_ids.stdout
 
@@ -124,8 +124,8 @@
 
  cron:
 
    name: backup
 
    cron_file: backup
 
    hour: 2
 
    minute: 0
 
    hour: "2"
 
    minute: "0"
 
    job: "/usr/bin/duply main backup"
 
    state: present
 
    user: root
0 comments (0 inline, 0 general)