Commit cb93e8e5 authored by Robin Sonnabend's avatar Robin Sonnabend

Ensure /etc/lvm/archive does not overflow

parent 51b31c6f
Pipeline #1437 passed with stage
in 58 seconds
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
owner: root owner: root
group: root group: root
mode: '0755' mode: '0755'
tags:
- lvm-snapshots
- name: ensure our deploy key is present - name: ensure our deploy key is present
copy: copy:
...@@ -19,8 +17,6 @@ ...@@ -19,8 +17,6 @@
group: root group: root
mode: '0600' mode: '0600'
no_log: true no_log: true
tags:
- lvm-snapshots
- name: ensure our public deploy key is present - name: ensure our public deploy key is present
copy: copy:
...@@ -30,8 +26,6 @@ ...@@ -30,8 +26,6 @@
group: root group: root
mode: '0644' mode: '0644'
no_log: true no_log: true
tags:
- lvm-snapshots
- name: ensure we have our lvm-snapshots ssh config - name: ensure we have our lvm-snapshots ssh config
copy: copy:
...@@ -40,8 +34,6 @@ ...@@ -40,8 +34,6 @@
owner: root owner: root
group: root group: root
mode: '0644' mode: '0644'
tags:
- lvm-snapshots
- name: ensure our lvm-snapshots ssh config is included - name: ensure our lvm-snapshots ssh config is included
lineinfile: lineinfile:
...@@ -51,15 +43,13 @@ ...@@ -51,15 +43,13 @@
owner: root owner: root
group: root group: root
mode: '0644' mode: '0644'
tags:
- lvm-snapshots
- name: ensure we have the program - name: ensure we have the program
git: git:
repo: git@git.fsmpi.rwth-aachen.de:infra/lvm-snapshots.git repo: git@git.fsmpi.rwth-aachen.de:infra/lvm-snapshots.git
dest: "{{ program_dir }}" dest: "{{ program_dir }}"
tags: environment:
- lvm-snapshots TMPDIR: /root/.ansible/tmp
- name: ensure the necessary programs are installed - name: ensure the necessary programs are installed
apt: apt:
...@@ -67,16 +57,12 @@ ...@@ -67,16 +57,12 @@
- python3 - python3
- virtualenv - virtualenv
state: present state: present
tags:
- lvm-snapshots
- name: ensure we have a virtualenv - name: ensure we have a virtualenv
pip: pip:
requirements: "{{ program_dir }}/requirements.txt" requirements: "{{ program_dir }}/requirements.txt"
virtualenv: "{{ program_dir }}" virtualenv: "{{ program_dir }}"
virtualenv_python: python3 virtualenv_python: python3
tags:
- lvm-snapshots
- name: ensure we have a frontend script - name: ensure we have a frontend script
template: template:
...@@ -85,8 +71,6 @@ ...@@ -85,8 +71,6 @@
owner: root owner: root
group: root group: root
mode: '0755' mode: '0755'
tags:
- lvm-snapshots
- name: ensure we have our config - name: ensure we have our config
template: template:
...@@ -95,13 +79,16 @@ ...@@ -95,13 +79,16 @@
owner: root owner: root
group: root group: root
mode: '0644' mode: '0644'
tags:
- lvm-snapshots
- name: ensure we have a cron job - name: ensure we have a cron job
cron: cron:
name: "lvm-snapshots" name: "lvm-snapshots"
minute: "*/{{ snapshot_cron_minutes }}" minute: "*/{{ snapshot_cron_minutes }}"
job: "/usr/local/sbin/lvm-snapshots update" job: "/usr/local/sbin/lvm-snapshots update"
tags:
- lvm-snapshots - name: ensure /etc/lvm/archive does not overflow
cron:
name: "lvm archive cleanup"
hour: "0"
minute: "0"
job: 'find /etc/lvm/archive -name "*.vg" -mtime +7 -delete'
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment