mirror of
https://github.com/pigmonkey/spark.git
synced 2026-01-23 02:24:09 +00:00
create tarsnap role
This commit is contained in:
parent
7b65fecfc2
commit
0b40158e2c
7 changed files with 1 additions and 26 deletions
|
|
@ -30,6 +30,7 @@
|
|||
- { role: virtualenv, tags: ['virtualenv'] }
|
||||
- { role: development, tags: ['development'] }
|
||||
- { role: backup, tags: ['backup'] }
|
||||
- { role: tarsnap, tags: ['tarsnap'] }
|
||||
- { role: mapping, tags: ['mapping'] }
|
||||
- { role: sound, tags: ['sound'] }
|
||||
- { role: archive, tags: ['archive'] }
|
||||
|
|
|
|||
|
|
@ -11,5 +11,3 @@
|
|||
aur: name=atticmatic user={{ user.name }}
|
||||
tags:
|
||||
- aur
|
||||
|
||||
- include: tarsnap.yml
|
||||
|
|
|
|||
|
|
@ -1,70 +1,46 @@
|
|||
---
|
||||
- name: Install Tarsnap
|
||||
pacman: name=tarsnap state=present
|
||||
tags:
|
||||
- tarsnap
|
||||
|
||||
- name: Copy default Tarsnap config
|
||||
copy: src=/etc/tarsnap/tarsnap.conf.sample dest=/etc/tarsnap/tarsnap.conf
|
||||
tags:
|
||||
- tarsnap
|
||||
|
||||
- name: Create Tarsnap cache dir
|
||||
file: path=/usr/local/tarsnap-cache state=directory
|
||||
tags:
|
||||
- tarsnap
|
||||
|
||||
- name: Humanize Tarsnap numbers
|
||||
lineinfile: dest=/etc/tarsnap/tarsnap.conf
|
||||
state=present
|
||||
line=humanize-numbers
|
||||
tags:
|
||||
- tarsnap
|
||||
|
||||
- name: Install Tarsnapper into virtual environment
|
||||
pip: name=tarsnapper
|
||||
virtualenv=/usr/local/env/tarsnapper
|
||||
virtualenv_command=virtualenv-2.7
|
||||
tags:
|
||||
- tarsnap
|
||||
|
||||
- name: Link Tarsnapper to bin
|
||||
file: src=/usr/local/env/tarsnapper/bin/tarsnapper
|
||||
dest=/usr/local/bin/tarsnapper
|
||||
state=link
|
||||
tags:
|
||||
- tarsnap
|
||||
|
||||
- name: Create Tarsnapper config include dir
|
||||
file: path=/usr/local/etc/tarsnapper.d/ state=directory
|
||||
tags:
|
||||
- tarsnap
|
||||
|
||||
- name: Push Tarsnapper config
|
||||
template: src=tarsnapper.conf.j2 dest=/usr/local/etc/tarsnapper.conf
|
||||
tags:
|
||||
- tarsnap
|
||||
|
||||
- name: Push Tarsnapper service file
|
||||
copy: src=tarsnapper.service dest=/etc/systemd/system/tarsnapper.service
|
||||
tags:
|
||||
- tarsnap
|
||||
|
||||
- name: Push Tarsnapper timer file
|
||||
template: src=tarsnapper.timer.j2 dest=/etc/systemd/system/tarsnapper.timer
|
||||
tags:
|
||||
- tarsnap
|
||||
|
||||
- name: Enable and start Tarsnapper timer
|
||||
service: name=tarsnapper.timer enabled=yes state=started
|
||||
when: tarsnapper.timer.run_on == "all"
|
||||
tags:
|
||||
- tarsnap
|
||||
|
||||
- name: Add tarsnapper to trusted unit list
|
||||
lineinfile: dest=/usr/local/etc/trusted_units
|
||||
state=present
|
||||
line=tarsnapper.timer
|
||||
when: tarsnapper.timer.run_on == "trusted"
|
||||
tags:
|
||||
- tarsnap
|
||||
Loading…
Add table
Add a link
Reference in a new issue