2020-08-18 11:57:53 +02:00
|
|
|
- name: install ffmpeg
|
|
|
|
become: yes
|
|
|
|
apt:
|
|
|
|
name: ffmpeg
|
2020-08-29 16:08:04 +02:00
|
|
|
state: absent
|
2020-08-18 11:57:53 +02:00
|
|
|
|
|
|
|
- name: create /etc/sicherung_medien
|
|
|
|
become: yes
|
|
|
|
file:
|
|
|
|
path: /etc/sicherung_medien
|
2020-08-29 16:08:04 +02:00
|
|
|
state: absent
|
2020-08-18 11:57:53 +02:00
|
|
|
|
|
|
|
- name: create sicherung_medien_* log
|
|
|
|
become: true
|
|
|
|
file:
|
|
|
|
path: "{{ item }}"
|
2020-08-29 16:08:04 +02:00
|
|
|
state: absent
|
2020-08-18 11:57:53 +02:00
|
|
|
with_items:
|
|
|
|
- /var/log/sicherung_medien_youtube.log
|
|
|
|
- /var/log/sicherung_medien_podcast.log
|
|
|
|
|
|
|
|
- name: copy conf-*.txt
|
|
|
|
become: yes
|
2020-08-29 16:08:04 +02:00
|
|
|
file:
|
|
|
|
path: "/etc/sicherung_medien/{{ item }}"
|
|
|
|
state: absent
|
2020-08-18 11:57:53 +02:00
|
|
|
with_items:
|
|
|
|
- conf-youtube.txt
|
|
|
|
- conf-podcast.txt
|
|
|
|
|
|
|
|
- name: copy ytdl-*.sh
|
|
|
|
become: yes
|
2020-08-29 16:08:04 +02:00
|
|
|
file:
|
|
|
|
path: "/usr/local/bin/{{ item }}"
|
|
|
|
state: absent
|
2020-08-18 11:57:53 +02:00
|
|
|
with_items:
|
|
|
|
- ytdl-youtube.sh
|
|
|
|
- ytdl-podcast.sh
|
|
|
|
|
|
|
|
- name: create cronjob sicherung_medien_*
|
|
|
|
become: yes
|
|
|
|
cron:
|
|
|
|
name: sicherung_medien_{{ item }}
|
2020-08-29 16:08:04 +02:00
|
|
|
state: absent
|
2020-08-18 11:57:53 +02:00
|
|
|
job: "/usr/local/bin/{{ item }}"
|
|
|
|
minute: "{{ youtubedl_cron_minutes }}"
|
|
|
|
hour: "{{ youtubedl_cron_hours }}"
|
2020-08-18 14:34:22 +02:00
|
|
|
day: "{{ youtubedl_cron_day }}"
|
2020-08-18 11:57:53 +02:00
|
|
|
with_items:
|
|
|
|
- ytdl-youtube.sh
|
|
|
|
- ytdl-podcast.sh
|
|
|
|
|
|
|
|
- name: Add logs to logrotate
|
|
|
|
become: true
|
2020-08-29 16:08:04 +02:00
|
|
|
file:
|
2020-08-18 11:57:53 +02:00
|
|
|
path: "/etc/logrotate.d/{{ item }}"
|
2020-08-29 16:08:04 +02:00
|
|
|
state: absent
|
2020-08-18 11:57:53 +02:00
|
|
|
with_items:
|
|
|
|
- sicherung_medien_youtube.log
|
|
|
|
- sicherung_medien_podcast.log
|