Minor changes
This commit is contained in:
@@ -2,7 +2,18 @@
|
||||
# Bits an pieces of this play are stolen from https://github.com/gavinwill/ansible-role-pfsense-backup/tree/main
|
||||
- name: PFSense Backups
|
||||
hosts: pfsense_nodes
|
||||
collections:
|
||||
- ansible.posix
|
||||
tasks:
|
||||
- name: Mount backup share
|
||||
ansible.posix.mount:
|
||||
path: /backup
|
||||
src: "10.42.0.3:/backups/pfsense"
|
||||
fstype: nfs
|
||||
opts: "hard,intr,nodev,nosuid,noexec"
|
||||
state: ephemeral
|
||||
delegate_to: blacktide
|
||||
|
||||
- name: Get Cookies and CSRF Token
|
||||
ansible.builtin.uri:
|
||||
url: "https://{{ backup_url }}/diag_backup.php"
|
||||
|
||||
@@ -10,6 +10,12 @@
|
||||
- backup_name_prefix
|
||||
- max_backups_kept
|
||||
|
||||
- name: Make sure backup dir exists
|
||||
ansible.builtin.file:
|
||||
path: "{{ backup_rules['backup_dir'] }}"
|
||||
state: directory
|
||||
recurse: true
|
||||
|
||||
- name: Stop the running container
|
||||
community.docker.docker_container:
|
||||
name: "{{ backup_rules.container_name }}"
|
||||
|
||||
Reference in New Issue
Block a user