lvm_self_backup: Option to configure user/group for status dir
This allows to give the telegraf container access to the backup status flags
This commit is contained in:
parent
a178af1735
commit
f67be989cc
3 changed files with 9 additions and 2 deletions
|
@ -21,6 +21,11 @@
|
|||
# The directory to put the status flag in
|
||||
backup_status_directory: "/monitoring"
|
||||
|
||||
# Status directory user & group id
|
||||
# This can be used for example to give telegraf access to the status files.
|
||||
backup_status_directory_uid: 100
|
||||
backup_status_directory_gid: 101
|
||||
|
||||
# The LVM volumes to backup
|
||||
# Available fields:
|
||||
# vg_name - The volume group that the volume resides in
|
||||
|
|
|
@ -34,8 +34,8 @@
|
|||
path: "{{ item }}"
|
||||
state: directory
|
||||
mode: '0700'
|
||||
owner: 'root'
|
||||
group: 'root'
|
||||
owner: "{{ backup_status_directory_uid }}"
|
||||
group: "{{ backup_status_directory_gid }}"
|
||||
recurse: true
|
||||
with_items:
|
||||
- "{{ backup_status_directory }}"
|
||||
|
|
|
@ -84,4 +84,6 @@ fi
|
|||
|
||||
echo $success > {{ backup_status_directory }}/backup.status
|
||||
|
||||
chown {{ backup_status_directory_uid }}:{{ backup_status_directory_gid }} {{ backup_status_directory }}/backup.status
|
||||
|
||||
exit $success
|
||||
|
|
Loading…
Add table
Reference in a new issue