Minor changes
This commit is contained in:
parent
846496d618
commit
3fad0e1124
@ -34,7 +34,7 @@ all:
|
||||
65396139333264636333656337383766393931393934373335646231336330656561303039326665
|
||||
3331636339356236330a333330373264306163393162386330393763613332376261373433303035
|
||||
65633034366439343232356639346665326234666630633063616437376131396463
|
||||
backup_location: "/backup/pfsense"
|
||||
backup_location: "/backup"
|
||||
backup_number_to_keep: 10
|
||||
boardwalk:
|
||||
ansible_host: "10.77.7.2"
|
||||
@ -47,7 +47,7 @@ all:
|
||||
36363736303436643163313636303931323032366136616634366363383036303737356336343638
|
||||
6566663062336566320a323536303233393431363263313933643839303435356266656136343438
|
||||
35306638356564333962656433323735656136386130373233393765616265306636
|
||||
backup_location: "/backup/pfsense"
|
||||
backup_location: "/backup"
|
||||
backup_number_to_keep: 10
|
||||
children:
|
||||
docker_nodes:
|
||||
|
@ -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 }}"
|
||||
|
Loading…
Reference in New Issue
Block a user