mirror of
https://github.com/borgbase/ansible-role-borgbackup.git
synced 2025-06-21 01:15:38 +02:00
Removed install_backup as var (bool) to prevent that this role run
This commit is contained in:
parent
d21ae6cf5f
commit
c810423b30
@ -93,7 +93,6 @@ $ git clone https://github.com/borgbase/ansible-role-borgbackup.git roles/ansibl
|
|||||||
|
|
||||||
|
|
||||||
### Optional Arguments
|
### Optional Arguments
|
||||||
- `install_backup`: If the varialbe (bool) is set to false the installation of the rolle is skipped.
|
|
||||||
- `borg_dep_packages`: Dependancy Packages to install `borg(backup)` and `borgmatic`.
|
- `borg_dep_packages`: Dependancy Packages to install `borg(backup)` and `borgmatic`.
|
||||||
- `borg_distro_packages`: contains the names of distributions packages for `borg(backup)` and `borgmatic`, only used if `borg_install_method` is set to `package`.
|
- `borg_distro_packages`: contains the names of distributions packages for `borg(backup)` and `borgmatic`, only used if `borg_install_method` is set to `package`.
|
||||||
- `borg_encryption_passcommand`: The standard output of this command is used to unlock the encryption key.
|
- `borg_encryption_passcommand`: The standard output of this command is used to unlock the encryption key.
|
||||||
|
@ -181,7 +181,3 @@ argument_specs:
|
|||||||
type: str
|
type: str
|
||||||
required: false
|
required: false
|
||||||
description: If the variable is set, a timer is installed. A choice must be made between "cron" and "systemd".
|
description: If the variable is set, a timer is installed. A choice must be made between "cron" and "systemd".
|
||||||
install_backup:
|
|
||||||
type: bool
|
|
||||||
required: false
|
|
||||||
description: If the varialbe is set to false the installation of the rolle is skipped.
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
---
|
---
|
||||||
- name: Install borgbackup
|
- name: Install borgbackup
|
||||||
when: install_backup is not defined or install_backup
|
|
||||||
tags:
|
tags:
|
||||||
- install_backup
|
- install_backup
|
||||||
block:
|
block:
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
- name: Get home dir
|
- name: Get home dir
|
||||||
when:
|
when:
|
||||||
- borgbackup_user == "root"
|
- borgbackup_user == "root"
|
||||||
- install_backup is not defined or install_backup
|
|
||||||
tags:
|
tags:
|
||||||
- install_backup
|
- install_backup
|
||||||
block:
|
block:
|
||||||
@ -22,8 +21,7 @@
|
|||||||
|
|
||||||
- name: Create User if borgbackup_user != "root"
|
- name: Create User if borgbackup_user != "root"
|
||||||
when:
|
when:
|
||||||
- borgbackup_user == "root"
|
- borgbackup_user != "root"
|
||||||
- install_backup is not defined or install_backup
|
|
||||||
tags:
|
tags:
|
||||||
- install_backup
|
- install_backup
|
||||||
ansible.builtin.include_tasks:
|
ansible.builtin.include_tasks:
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: Create ssh-key (if neeeded) for {{ borgbackup_user }}
|
- name: Create ssh-key (if neeeded) for {{ borgbackup_user }}
|
||||||
when:
|
when:
|
||||||
- install_backup is not defined or install_backup
|
|
||||||
- backup_id_rsa is not defined or backup_id_rsa | length == 0
|
- backup_id_rsa is not defined or backup_id_rsa | length == 0
|
||||||
tags:
|
tags:
|
||||||
- install_backup
|
- install_backup
|
||||||
@ -45,7 +44,6 @@
|
|||||||
|
|
||||||
- name: Install ssh cert and key for user
|
- name: Install ssh cert and key for user
|
||||||
when:
|
when:
|
||||||
- install_backup is not defined or install_backup
|
|
||||||
- backup_id_rsa is defined and backup_id_rsa | length > 0
|
- backup_id_rsa is defined and backup_id_rsa | length > 0
|
||||||
- backup_id_rsa_pub is defined and backup_id_rsa_pub | length > 0
|
- backup_id_rsa_pub is defined and backup_id_rsa_pub | length > 0
|
||||||
tags:
|
tags:
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
---
|
---
|
||||||
- name: Configure borgbackup
|
- name: Configure borgbackup
|
||||||
when:
|
|
||||||
- install_backup is not defined or install_backup
|
|
||||||
tags:
|
tags:
|
||||||
- install_backup
|
- install_backup
|
||||||
block:
|
block:
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: Init repository
|
- name: Init repository
|
||||||
when:
|
when:
|
||||||
- install_backup is not defined or install_backup
|
|
||||||
- borgmatic_initialization_repo is defined and borgmatic_initialization_repo
|
- borgmatic_initialization_repo is defined and borgmatic_initialization_repo
|
||||||
tags:
|
tags:
|
||||||
- install_backup
|
- install_backup
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: Create borgbackup timer
|
- name: Create borgbackup timer
|
||||||
when:
|
when:
|
||||||
- install_backup is not defined or install_backup
|
|
||||||
- borgmatic_timer is defined and borgmatic_timer == "systemd"
|
- borgmatic_timer is defined and borgmatic_timer == "systemd"
|
||||||
tags:
|
tags:
|
||||||
- install_backup
|
- install_backup
|
||||||
@ -12,7 +11,6 @@
|
|||||||
|
|
||||||
- name: Create borgbackup cron
|
- name: Create borgbackup cron
|
||||||
when:
|
when:
|
||||||
- install_backup is not defined or install_backup
|
|
||||||
- borgmatic_timer is defined or borgmatic_timer == "cron"
|
- borgmatic_timer is defined or borgmatic_timer == "cron"
|
||||||
tags:
|
tags:
|
||||||
- install_backup
|
- install_backup
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
tags:
|
tags:
|
||||||
- install_backup
|
- install_backup
|
||||||
when:
|
when:
|
||||||
- install_backup is not defined or install_backup
|
|
||||||
- backup_create_local_user is not defined or backup_create_local_user
|
- backup_create_local_user is not defined or backup_create_local_user
|
||||||
- borgbackup_user != "root"
|
- borgbackup_user != "root"
|
||||||
block:
|
block:
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: Add cron-job for borgmatic (large repo, create and check separate)
|
- name: Add cron-job for borgmatic (large repo, create and check separate)
|
||||||
when:
|
when:
|
||||||
- install_backup is not defined or install_backup
|
|
||||||
- borgmatic_timer is defined and borgmatic_timer == "cron"
|
- borgmatic_timer is defined and borgmatic_timer == "cron"
|
||||||
- borgmatic_large_repo
|
- borgmatic_large_repo
|
||||||
tags:
|
tags:
|
||||||
@ -36,7 +35,6 @@
|
|||||||
|
|
||||||
- name: Add cron-job for borgmatic (normal-sized repo)
|
- name: Add cron-job for borgmatic (normal-sized repo)
|
||||||
when:
|
when:
|
||||||
- install_backup is not defined or install_backup
|
|
||||||
- borgmatic_timer is defined and borgmatic_timer == "cron"
|
- borgmatic_timer is defined and borgmatic_timer == "cron"
|
||||||
- not borgmatic_large_repo
|
- not borgmatic_large_repo
|
||||||
tags:
|
tags:
|
||||||
@ -58,7 +56,6 @@
|
|||||||
|
|
||||||
- name: Set PATH for borgmatic cron job.
|
- name: Set PATH for borgmatic cron job.
|
||||||
when:
|
when:
|
||||||
- install_backup is not defined or install_backup
|
|
||||||
- borgmatic_timer is defined and borgmatic_timer == "cron"
|
- borgmatic_timer is defined and borgmatic_timer == "cron"
|
||||||
tags:
|
tags:
|
||||||
- install_backup
|
- install_backup
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: Create borgbackup timer
|
- name: Create borgbackup timer
|
||||||
when:
|
when:
|
||||||
- install_backup is not defined or install_backup
|
|
||||||
- borgmatic_timer is defined and borgmatic_timer == "systemd"
|
- borgmatic_timer is defined and borgmatic_timer == "systemd"
|
||||||
tags:
|
tags:
|
||||||
- install_backup
|
- install_backup
|
||||||
|
Loading…
Reference in New Issue
Block a user