changes for backup state

This commit is contained in:
m0duspwnens
2022-10-12 11:31:42 -04:00
parent b526532ab6
commit 6a17f201a2
8 changed files with 16 additions and 8 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ config_backup_script:
- group: root
- file_mode: 755
- template: jinja
- source: salt://backup/tools/sbin
- source: salt://backup/tools/sbin/so-config-backup.jinja
- defaults:
BACKUPLOCATIONS: {{ BACKUP_MERGED.locations }}
+3
View File
@@ -1,3 +1,6 @@
backup:
locations:
- /opt/so/saltstack/local
- /etc/pki
- /etc/salt
- /opt/so/conf/kratos
+1 -1
View File
@@ -1,2 +1,2 @@
{% import_yaml 'backup/defaults.yaml' as BACKUP_DEFAULTS %}
{% set BACKUP_MERGED = salt['pillar.get']('backup', BACKUP_DEFAULTS, merge=true, merge_nested_lists=true) %}
{% set BACKUP_MERGED = salt['pillar.get']('backup', BACKUP_DEFAULTS.backup, merge=true, merge_nested_lists=true) %}
@@ -24,9 +24,6 @@ if [ ! -f $BACKUPFILE ]; then
{%- for LOCATION in BACKUPLOCATIONS %}
tar -rf $BACKUPFILE {{ LOCATION }}
{%- endfor %}
tar -rf $BACKUPFILE /etc/pki
tar -rf $BACKUPFILE /etc/salt
tar -rf $BACKUPFILE /opt/so/conf/kratos
fi