aboutsummaryrefslogtreecommitdiffstats
path: root/tasks/main.yml
diff options
context:
space:
mode:
authorColin Wilk <colin@wilk.cx>2026-07-02 18:10:04 +0200
committerColin Wilk <colin@wilk.cx>2026-07-02 18:10:04 +0200
commit50b914e77695fd1cdb294653f20143747e7e3b01 (patch)
treeb667145cd04e39abb52d1680fc61a17513ae0af6 /tasks/main.yml
parent66e46df3d2a840bf62ef8084ad171041772db65e (diff)
downloadansible-role-borgbackup-50b914e77695fd1cdb294653f20143747e7e3b01.tar.gz
ansible-role-borgbackup-50b914e77695fd1cdb294653f20143747e7e3b01.zip
Add state: absent variable
Allow removing configuration for repositories.
Diffstat (limited to 'tasks/main.yml')
-rw-r--r--tasks/main.yml7
1 files changed, 7 insertions, 0 deletions
diff --git a/tasks/main.yml b/tasks/main.yml
index 7ffef06..6feca79 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -1,9 +1,16 @@
---
- name: Install dependencies
ansible.builtin.include_tasks: installation.yml
+ when: state == "present"
- name: Run setup on server
ansible.builtin.include_tasks: server_setup.yml
+ when: state == "present"
- name: Run setup on client
ansible.builtin.include_tasks: client_setup.yml
+ when: state == "present"
+
+- name: Remove borg backup configuration
+ ansible.builtin.include_tasks: absent.yml
+ when: state == "absent"