diff --git a/roles/backup/defaults/main.yaml b/roles/backup/defaults/main.yaml new file mode 100644 index 0000000..85242b0 --- /dev/null +++ b/roles/backup/defaults/main.yaml @@ -0,0 +1,2 @@ +--- +# user_name: # required for snapper templates diff --git a/roles/backup/templates/snapper-configurations/home.j2 b/roles/backup/templates/snapper-configurations/home.j2 index ef7bcf3..48030d0 100644 --- a/roles/backup/templates/snapper-configurations/home.j2 +++ b/roles/backup/templates/snapper-configurations/home.j2 @@ -14,7 +14,7 @@ SPACE_LIMIT="0.5" FREE_LIMIT="0.2" # users and groups allowed to work with config -ALLOW_USERS="{{ user_name }}" +ALLOW_USERS="{{ user_name | default('root') }}" ALLOW_GROUPS="" # sync users and groups from ALLOW_USERS and ALLOW_GROUPS to .snapshots diff --git a/roles/backup/templates/snapper-configurations/root.j2 b/roles/backup/templates/snapper-configurations/root.j2 index 6218117..2abfce2 100644 --- a/roles/backup/templates/snapper-configurations/root.j2 +++ b/roles/backup/templates/snapper-configurations/root.j2 @@ -14,7 +14,7 @@ SPACE_LIMIT="0.5" FREE_LIMIT="0.2" # users and groups allowed to work with config -ALLOW_USERS="{{ user_name }}" +ALLOW_USERS="{{ user_name | default('root') }}" ALLOW_GROUPS="" # sync users and groups from ALLOW_USERS and ALLOW_GROUPS to .snapshots