mirror of
https://github.com/borgbase/ansible-role-borgbackup.git
synced 2024-11-19 19:07:42 +01:00
Fix failing on EPEL check in Fedora (#111)
* Fix failing on EPEL check in Fedora Only applies when using the "package" install method. Added a separate variable "borg_require_epel" to make it easy to disable the check in any other situations (e.g. using a custom mirror instead of the epel-release package). * Explain default value of borg_require_epel
This commit is contained in:
parent
2f57fce727
commit
7efeb1be5e
@ -87,6 +87,7 @@ $ git clone https://github.com/borgbase/ansible-role-borgbackup.git roles/ansibl
|
|||||||
- `borg_exclude_from`: Read exclude patterns from one or more separate named files, one pattern per line.
|
- `borg_exclude_from`: Read exclude patterns from one or more separate named files, one pattern per line.
|
||||||
- `borg_exclude_patterns`: Paths or patterns to exclude from backup. See [official documentation](https://borgbackup.readthedocs.io/en/stable/usage/help.html#borg-help-patterns) for more.
|
- `borg_exclude_patterns`: Paths or patterns to exclude from backup. See [official documentation](https://borgbackup.readthedocs.io/en/stable/usage/help.html#borg-help-patterns) for more.
|
||||||
- `borg_install_method`: By default `pip` is used to install borgmatic. To install via your distributions package manager set this to `package` and (if needed) overwrite the `borg_distro_packages` variable to contain your distributions package names required to install borgmatic. Note that many distributions ship outdated versions of borgbackup and borgmatic; use at your own risk.
|
- `borg_install_method`: By default `pip` is used to install borgmatic. To install via your distributions package manager set this to `package` and (if needed) overwrite the `borg_distro_packages` variable to contain your distributions package names required to install borgmatic. Note that many distributions ship outdated versions of borgbackup and borgmatic; use at your own risk.
|
||||||
|
- `borg_require_epel`: When using `borg_install_method: package` on RHEL-based distributions, the EPEL repo is required. To disable the check (e.g. when using a custom mirror instead of the `epel-release` package), set this to `false`. Defaults to `{{ ansible_os_family == 'RedHat' and ansible_distribution != 'Fedora' }}` (i.e. `true` on Enterprise Linux-based distros).
|
||||||
- `borg_lock_wait_time`: Config maximum seconds to wait for acquiring a repository/cache lock. Defaults to 5 seconds.
|
- `borg_lock_wait_time`: Config maximum seconds to wait for acquiring a repository/cache lock. Defaults to 5 seconds.
|
||||||
- `borg_one_file_system`: Don't cross file-system boundaries. Defaults to `true`
|
- `borg_one_file_system`: Don't cross file-system boundaries. Defaults to `true`
|
||||||
- `borg_pip_packages`: Dependancy Packages (pip) to install `borg(backup)` and `borgmatic`.
|
- `borg_pip_packages`: Dependancy Packages (pip) to install `borg(backup)` and `borgmatic`.
|
||||||
|
@ -22,6 +22,7 @@ borgmatic_timer: cron
|
|||||||
borgmatic_timer_hour: "{{ range(0, 5) | random(seed=inventory_hostname) }}"
|
borgmatic_timer_hour: "{{ range(0, 5) | random(seed=inventory_hostname) }}"
|
||||||
borgmatic_timer_minute: "{{ range(0, 59) | random(seed=inventory_hostname) }}"
|
borgmatic_timer_minute: "{{ range(0, 59) | random(seed=inventory_hostname) }}"
|
||||||
borg_install_method: "pip"
|
borg_install_method: "pip"
|
||||||
|
borg_require_epel: "{{ ansible_os_family == 'RedHat' and ansible_distribution != 'Fedora' }}"
|
||||||
|
|
||||||
borgmatic_config_name: config.yaml
|
borgmatic_config_name: config.yaml
|
||||||
borgmatic_hooks:
|
borgmatic_hooks:
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
- name: Install borgbackup by distro
|
- name: Install borgbackup by distro
|
||||||
block:
|
block:
|
||||||
- name: Check if EPEL repo is enabled, if installation from distro is requested
|
- name: Check if EPEL repo is enabled, if installation from distro is requested
|
||||||
when: ansible_os_family == 'RedHat'
|
when: borg_require_epel
|
||||||
block:
|
block:
|
||||||
- name: Get list of installed packages
|
- name: Get list of installed packages
|
||||||
ansible.builtin.package_facts:
|
ansible.builtin.package_facts:
|
||||||
|
Loading…
Reference in New Issue
Block a user