Put logrotate,iptables,snapper and smartd to common
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
---
|
||||
- name: iptables - install iptables-persistent
|
||||
package: name=iptables-persistent
|
||||
|
||||
- name: /etc/iptables/rules.v4
|
||||
template: dest=/etc/iptables/rules.v4 src=iptables_rules_v4.j2 owner=root group=root mode=0644
|
||||
notify:
|
||||
iptables restore
|
||||
|
||||
- name: /etc/iptables/rules.v6
|
||||
template: dest=/etc/iptables/rules.v6 src=iptables_rules_v6.j2 owner=root group=root mode=0644
|
||||
notify:
|
||||
iptables restore
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
- name: logrotate - set backlog
|
||||
lineinfile:
|
||||
path: /etc/logrotate.conf
|
||||
regexp: '^rotate '
|
||||
line: 'rotate 52'
|
||||
@@ -1,12 +1,4 @@
|
||||
---
|
||||
- import_tasks: logrotate.yml
|
||||
when: ariane_logrotate
|
||||
tags: ['ariane_logrotate', 'logrotate']
|
||||
|
||||
- import_tasks: iptables.yml
|
||||
when: ariane_iptables
|
||||
tags: ['ariane_iptables', 'iptables']
|
||||
|
||||
- import_tasks: zfs.yml
|
||||
when: ariane_zfs
|
||||
tags: ['ariane_zfs', 'zfs']
|
||||
@@ -18,11 +10,3 @@
|
||||
- import_tasks: lxc_void.yml
|
||||
when: ariane_lxc_void
|
||||
tags: ['ariane_lxc_void', 'lxc', 'lxc_void']
|
||||
|
||||
- import_tasks: snapper.yml
|
||||
when: ariane_snapper
|
||||
tags: ['ariane_snapper', 'snapper']
|
||||
|
||||
- import_tasks: smartd.yml
|
||||
when: ariane_smartd
|
||||
tags: ['ariane_smartd', 'smartd']
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
---
|
||||
- name: smartd - install smartmontools
|
||||
package: name=smartmontools
|
||||
|
||||
- name: smartd - /etc/default/smartmontools
|
||||
replace:
|
||||
path: /etc/default/smartmontools
|
||||
regexp: "^#start_smartd=.*"
|
||||
replace: "start_smartd=yes"
|
||||
notify: restart smartd
|
||||
|
||||
- name: smartd - /etc/smartd.conf
|
||||
copy:
|
||||
dest: /etc/smartd.conf
|
||||
content: "DEVICESCAN -a -d nvme -d sat -o on -s (S/../.././01) -n standby -R 5 -I 9 -R 194 -m root -M exec /usr/share/smartmontools/smartd-runner\n"
|
||||
notify: restart smartd
|
||||
@@ -1,20 +0,0 @@
|
||||
---
|
||||
- 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