Add logrotate,iptables,snapper and smartd

This commit is contained in:
Daniel A. Maierhofer
2018-07-13 14:19:06 +02:00
parent 1a0adb219d
commit f58be4106c
10 changed files with 103 additions and 2 deletions

20
tasks/snapper.yml Normal file
View 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