Add logrotate,iptables,snapper and smartd
This commit is contained in:
20
tasks/snapper.yml
Normal file
20
tasks/snapper.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
- name: snapper - install snapper
|
||||
package: name=snapper
|
||||
|
||||
- name: snapper - create-config
|
||||
command: snapper create-config /
|
||||
args:
|
||||
creates: /etc/snapper/configs/root
|
||||
|
||||
- name: snapper - get rootfs blkid
|
||||
shell: "blkid -s UUID|grep `mount|grep '/ '|cut -d' ' -f1`|cut -d' ' -f 2"
|
||||
register: snapper_blkid
|
||||
changed_when: False
|
||||
|
||||
- name: snapper - /etc/fstab
|
||||
lineinfile:
|
||||
path: /etc/fstab
|
||||
line: "{{ snapper_blkid.stdout_lines[0] }} /.snapshots btrfs subvol=.snapshots 0 1"
|
||||
when: snapper_blkid.stdout_lines is defined
|
||||
notify: snapper - reload fstab
|
||||
Reference in New Issue
Block a user