Changeset - 66da094b2fca
[Not reviewed]
0 1 1
Branko Majic (branko) - 7 years ago 2017-04-19 23:05:28
branko@majic.rs
MAR-96: Moved setting of facts for gpg/gpg2 binary detection in backup_client role into separate yml file. Assigned the handlers tag to it to make sure the facts are available when only handlers get executed.
2 files changed with 17 insertions and 12 deletions:
0 comments (0 inline, 0 general)
roles/backup_client/tasks/facts.yml
Show inline comments
 
new file 100644
 
---
 

	
 
# Determine how to invoke the GnuPG binary based on Debian version.
 
- set_fact: gnupg_binary="gpg2"
 
  when: "ansible_distribution == 'Debian' and ansible_distribution_release == 'jessie'"
 
- set_fact: gnupg_binary="gpg"
 
  when: "ansible_distribution == 'Debian' and ansible_distribution_release == 'stretch'"
 

	
 
# Determine cut-off for the GnuPG key ID (long vs short) based on Debian
 
# version.
 
- set_fact: gnupg_key_cutoff="{8}"
 
  when: "ansible_distribution == 'Debian' and ansible_distribution_release == 'jessie'"
 
- set_fact: gnupg_key_cutoff="{0}"
 
  when: "ansible_distribution == 'Debian' and ansible_distribution_release == 'stretch'"
roles/backup_client/tasks/main.yml
Show inline comments
 
---
 

	
 
# Determine how to invoke the GnuPG binary based on Debian version.
 
- set_fact: gnupg_binary="gpg2"
 
  when: "ansible_distribution == 'Debian' and ansible_distribution_release == 'jessie'"
 
- set_fact: gnupg_binary="gpg"
 
  when: "ansible_distribution == 'Debian' and ansible_distribution_release == 'stretch'"
 

	
 
# Determine cut-off for the GnuPG key ID (long vs short) based on Debian
 
# version.
 
- set_fact: gnupg_key_cutoff="{8}"
 
  when: "ansible_distribution == 'Debian' and ansible_distribution_release == 'jessie'"
 
- set_fact: gnupg_key_cutoff="{0}"
 
  when: "ansible_distribution == 'Debian' and ansible_distribution_release == 'stretch'"
 
- include: facts.yml
 
  tags:
 
    - handlers
 

	
 
- name: Install pexpect for pexpect+sftp Duplicity backend (only on Stretch)
 
  apt: name="python-pexpect" state=installed
0 comments (0 inline, 0 general)