[TIDY] move when statements, fix whitespace

Having the when condition of a task at the top instead of bottom is
easiert to read. Also some spaces were another whitespace character on
accident.
This commit is contained in:
Jannik Beyerstedt 2022-02-13 20:52:02 +01:00
parent 1de4e4ef24
commit a0ac0a67a7
13 changed files with 54 additions and 60 deletions

View file

@ -8,21 +8,26 @@
# For Debian Stretch, use a newer package version from backports
- name: borgbackup - Add debian repo key
when:
- ansible_distribution_release == 'stretch'
become: yes
ansible.builtin.apt_key:
keyserver: pgpkeys.mit.edu
id: 8B48AD6246925553
state: present
- name: borgbackup - Add stretch-backports
when:
- ansible_distribution_release == 'stretch'
- name: borgbackup - Add stretch-backports
become: yes
ansible.builtin.apt_repository:
repo: deb http://ftp.debian.org/debian stretch-backports main
state: present
when:
- ansible_distribution_release == 'stretch'
- name: borgbackup - Install borgbackup from stretch-backports
when:
- borgbackup_passphrase is defined
- borgbackup_repo is defined
- borgbackup_hostname is defined
- ansible_distribution_release == 'stretch'
become: yes
ansible.builtin.apt:
name: borgbackup
@ -30,8 +35,3 @@
default_release: stretch-backports
update_cache: yes
cache_valid_time: 3600
when:
- borgbackup_passphrase is defined
- borgbackup_repo is defined
- borgbackup_hostname is defined
- ansible_distribution_release == 'stretch'