lvm_self_backup: Adjust directory permissions
This patch reduces the permissions on the install directory to just the root user and also fixes the ansible-lint issue by specifying the `mode`.
This commit is contained in:
parent
6782cb8191
commit
22302117fa
1 changed files with 8 additions and 5 deletions
|
@ -21,6 +21,9 @@
|
||||||
file:
|
file:
|
||||||
path: "/backup_snapshots/{{ item.vg_name }}-{{ item.lv_name }}"
|
path: "/backup_snapshots/{{ item.vg_name }}-{{ item.lv_name }}"
|
||||||
state: directory
|
state: directory
|
||||||
|
mode: '0700'
|
||||||
|
owner: 'root'
|
||||||
|
group: 'root'
|
||||||
recurse: true
|
recurse: true
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ backup_vols }}"
|
- "{{ backup_vols }}"
|
||||||
|
@ -30,9 +33,9 @@
|
||||||
template:
|
template:
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
dest: "{{ item.dest }}"
|
dest: "{{ item.dest }}"
|
||||||
mode: '1700'
|
mode: '0700'
|
||||||
owner: root
|
owner: 'root'
|
||||||
group: root
|
group: 'root'
|
||||||
with_items:
|
with_items:
|
||||||
- src: "backup-lvm.sh"
|
- src: "backup-lvm.sh"
|
||||||
dest: "/usr/local/bin/backup-lvm"
|
dest: "/usr/local/bin/backup-lvm"
|
||||||
|
@ -45,8 +48,8 @@
|
||||||
src: "{{ item }}"
|
src: "{{ item }}"
|
||||||
dest: /etc/systemd/system/
|
dest: /etc/systemd/system/
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
owner: root
|
owner: 'root'
|
||||||
group: root
|
group: 'root'
|
||||||
with_items:
|
with_items:
|
||||||
- "backup-lvm.service"
|
- "backup-lvm.service"
|
||||||
- "backup-lvm.timer"
|
- "backup-lvm.timer"
|
||||||
|
|
Loading…
Add table
Reference in a new issue