homeserver/roles/mgrote.musterrolle/tasks/main.yml
Quotengrote 15d783de86
FQCN eingeführt (#70)
* template --> ansible.builtin.template

* apt --> ansible.builtin.apt

* lineinfile --> ansible.builtin.lineinfile

* file --> ansible.builtin.file

* blockinfile --> ansible.builtin.blockinfile

* cron --> ansible.builtin.cron

* timezone --> ansible.builtin.timezone

* get_url --> ansible.builtin.get_url

* group --> ansible.builtin.group

* user --> ansible.builtin.user

* unarchive --> ansible.builtin.unarchive

* service --> ansible.builtin.service

* apache2_module --> ansible.builtin.apache2_module

* package --> ansible.builtin.apt

* template --> ansible.builtin.template 2
2020-11-21 19:41:19 +01:00

59 lines
1.2 KiB
YAML

# für scripte
- name: create /etc/restic
become: yes
ansible.builtin.file:
path: /etc/restic
state: directory
##### install logroate
- name: copy restic_backup.sh
become: yes
ansible.builtin.template:
src: "restic_backup.sh"
dest: "/usr/local/bin/restic_backup.sh"
mode: a+x
- name: copy exclude.txt
become: yes
ansible.builtin.template:
src: "exclude.txt"
dest: "/etc/restic/exclude.txt"
- name: Create restic log
become: true
ansible.builtin.file:
path: /var/log/restic.log
state: touch
owner: root
group: root
mode: 0644
access_time: preserve
modification_time: preserve
- name: Add restic Log to be Rotated
become: true
ansible.builtin.blockinfile:
path: /etc/logrotate.d/restic
state: present
create: yes
owner: root
group: root
mode: 0644
block: |
/var/log/restic.log {
su root root
create 0640 root root
rotate 4
weekly
compress
missingok
notifempty
dateext
dateyesterday
}
# SIEHE: http://dokuwiki2.grote.lan/artikel/technik/linux_-_scripte_-_speicherorte