mirror of
https://github.com/borgbase/ansible-role-borgbackup.git
synced 2026-02-01 20:04:08 +01:00
Merge 9a77705f28 into 747b4698b5
This commit is contained in:
commit
55ba120358
@ -27,6 +27,7 @@ borgmatic_timer_enabled: true
|
||||
borgmatic_systemd_nonewprivileges: "yes"
|
||||
borg_install_method: "pip"
|
||||
borg_require_epel: "{{ ansible_os_family == 'RedHat' and ansible_distribution != 'Fedora' }}"
|
||||
borg_require_backports: "{{ ansible_distribution == 'Debian' and ansible_distribution_major_version == '11' }}"
|
||||
|
||||
borgmatic_config_name: config.yaml
|
||||
borgmatic_hooks:
|
||||
|
||||
@ -13,9 +13,17 @@
|
||||
- "'epel-release' in ansible_facts.packages"
|
||||
fail_msg: Need EPEL repo to install via distro package.
|
||||
|
||||
- name: Check if backports repo is enabled, if installation from distro is requested
|
||||
when: borg_require_backports
|
||||
ansible.builtin.apt_repository:
|
||||
repo: "deb http://deb.debian.org/debian {{ ansible_distribution_release }}-backports main"
|
||||
state: present
|
||||
register: __borg_require_backports
|
||||
|
||||
- name: Install borgmatic and borg via distribution package manager
|
||||
ansible.builtin.package:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
state: "{{ __borg_require_backports.changed | ternary('latest', 'present') }}"
|
||||
default_release: "{{ borg_require_backports | ternary(ansible_distribution_release + '-backports', omit) }}"
|
||||
loop: "{{ borg_distro_packages }}"
|
||||
...
|
||||
|
||||
Loading…
Reference in New Issue
Block a user