sicherung mit ytdl entfernt (#21)
This commit is contained in:
parent
114f4afe91
commit
807332bb74
3 changed files with 12 additions and 57 deletions
|
@ -20,25 +20,6 @@
|
||||||
smb_workgroup: WORKGROUP
|
smb_workgroup: WORKGROUP
|
||||||
smb_nutzer_loeschen:
|
smb_nutzer_loeschen:
|
||||||
- { name: 'platzhalter' }
|
- { name: 'platzhalter' }
|
||||||
### mgrote.sicherung_medien
|
|
||||||
sicherung_medien_username: michael.grote@posteo.de
|
|
||||||
sicherung_medien_passwort: "{{ lookup('keepass', 'sicherung_medien_passwort', 'password') }}"
|
|
||||||
youtubedl_update: false
|
|
||||||
youtubedl_cron_minutes: "40"
|
|
||||||
youtubedl_cron_hours: "21"
|
|
||||||
youtubedl_cron_day: "*/2,*/5"
|
|
||||||
playlisten_youtube:
|
|
||||||
- { url: 'https://www.youtube.com/playlist?list=PLPM-eyPokAWNhhDNO4YzC5cGRwuI2ykwE', titel: 'music'}
|
|
||||||
- { url: 'https://www.youtube.com/playlist?list=PLPM-eyPokAWNnDxuyX131R5wkl8fzvu7D', titel: 'lost and found'}
|
|
||||||
- { url: 'https://www.youtube.com/playlist?list=PLPM-eyPokAWPmStfh37roJge-JuLfgma0', titel: 'lost and found 2'}
|
|
||||||
- { url: 'https://www.youtube.com/watch?v=rj1RVBjEbTY&list=PLKSNR-nHKRS9B_mdvJp1m48augOyIL1zJ', titel: 'Sommerfigur in 14 Tagen'}
|
|
||||||
- { url: 'https://www.youtube.com/watch?v=ba60qzHoBL0&list=PLKSNR-nHKRS_jbfveFFlD07PUdEHg8Nlt', titel: '14 Tage Abnehmen & Figur'}
|
|
||||||
- { url: 'https://www.youtube.com/channel/UCwRH985XgMYXQ6NxXDo8npw', titel: 'Kurzgesagt - Deutsch'}
|
|
||||||
- { url: 'https://www.youtube.com/channel/UCsXVk37bltHxD1rDPwtNM8Q', titel: 'Kurzgesagt - Englisch'}
|
|
||||||
- { url: 'https://www.youtube.com/watch?v=siIQ1jPtmEQ&list=PLs4hTtftqnlAkiQNdWn6bbKUr-P1wuSm0', titel: 'Jimmy Kimmel - Mean Tweets'}
|
|
||||||
playlisten_podcast:
|
|
||||||
- { url: 'https://sternengeschichten.podigee.io/feed/aac', titel: 'Kurzgesagt - Deutsch'}
|
|
||||||
- { url: 'https://feeds.br.de/radiowissen/feed.xml', titel: 'Kurzgesagt - Englisch'}
|
|
||||||
### mgrote.nextcloud_sicherung
|
### mgrote.nextcloud_sicherung
|
||||||
nextcloud_sicherung_cron_minutes: "20"
|
nextcloud_sicherung_cron_minutes: "20"
|
||||||
nextcloud_sicherung_cron_hours: "21"
|
nextcloud_sicherung_cron_hours: "21"
|
||||||
|
|
|
@ -16,6 +16,5 @@
|
||||||
roles:
|
roles:
|
||||||
- { role: mgrote.postfix-gmail, tags: "postfix-gmail" }
|
- { role: mgrote.postfix-gmail, tags: "postfix-gmail" }
|
||||||
- { role: mgrote.fileserver_smb, tags: "fileserver_smb" }
|
- { role: mgrote.fileserver_smb, tags: "fileserver_smb" }
|
||||||
- { role: mgrote.sicherung_medien, tags: "youtube-dl", when: ansible_hostname == "fileserver2", become: true }
|
|
||||||
- { role: mgrote.sicherung_nextcloud, tags: "nextcloud_sicherung", when: ansible_hostname == "fileserver2" }
|
- { role: mgrote.sicherung_nextcloud, tags: "nextcloud_sicherung", when: ansible_hostname == "fileserver2" }
|
||||||
- { role: mgrote.sicherung_cloud, tags: "cloud", when: ansible_hostname == "fileserver2" }
|
- { role: mgrote.sicherung_cloud, tags: "cloud", when: ansible_hostname == "fileserver2" }
|
||||||
|
|
|
@ -2,46 +2,37 @@
|
||||||
become: yes
|
become: yes
|
||||||
apt:
|
apt:
|
||||||
name: ffmpeg
|
name: ffmpeg
|
||||||
state: present
|
state: absent
|
||||||
|
|
||||||
- name: create /etc/sicherung_medien
|
- name: create /etc/sicherung_medien
|
||||||
become: yes
|
become: yes
|
||||||
file:
|
file:
|
||||||
path: /etc/sicherung_medien
|
path: /etc/sicherung_medien
|
||||||
state: directory
|
state: absent
|
||||||
|
|
||||||
- name: create sicherung_medien_* log
|
- name: create sicherung_medien_* log
|
||||||
become: true
|
become: true
|
||||||
file:
|
file:
|
||||||
path: "{{ item }}"
|
path: "{{ item }}"
|
||||||
state: touch
|
state: absent
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
mode: 0644
|
|
||||||
access_time: preserve
|
|
||||||
modification_time: preserve
|
|
||||||
with_items:
|
with_items:
|
||||||
- /var/log/sicherung_medien_youtube.log
|
- /var/log/sicherung_medien_youtube.log
|
||||||
- /var/log/sicherung_medien_podcast.log
|
- /var/log/sicherung_medien_podcast.log
|
||||||
|
|
||||||
- name: copy conf-*.txt
|
- name: copy conf-*.txt
|
||||||
become: yes
|
become: yes
|
||||||
template:
|
file:
|
||||||
src: "{{ item }}"
|
path: "/etc/sicherung_medien/{{ item }}"
|
||||||
dest: "/etc/sicherung_medien/{{ item }}"
|
state: absent
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
mode: 0700
|
|
||||||
with_items:
|
with_items:
|
||||||
- conf-youtube.txt
|
- conf-youtube.txt
|
||||||
- conf-podcast.txt
|
- conf-podcast.txt
|
||||||
|
|
||||||
- name: copy ytdl-*.sh
|
- name: copy ytdl-*.sh
|
||||||
become: yes
|
become: yes
|
||||||
template:
|
file:
|
||||||
src: "{{ item }}"
|
path: "/usr/local/bin/{{ item }}"
|
||||||
dest: "/usr/local/bin/{{ item }}"
|
state: absent
|
||||||
mode: a+x
|
|
||||||
with_items:
|
with_items:
|
||||||
- ytdl-youtube.sh
|
- ytdl-youtube.sh
|
||||||
- ytdl-podcast.sh
|
- ytdl-podcast.sh
|
||||||
|
@ -50,7 +41,7 @@
|
||||||
become: yes
|
become: yes
|
||||||
cron:
|
cron:
|
||||||
name: sicherung_medien_{{ item }}
|
name: sicherung_medien_{{ item }}
|
||||||
state: present
|
state: absent
|
||||||
job: "/usr/local/bin/{{ item }}"
|
job: "/usr/local/bin/{{ item }}"
|
||||||
minute: "{{ youtubedl_cron_minutes }}"
|
minute: "{{ youtubedl_cron_minutes }}"
|
||||||
hour: "{{ youtubedl_cron_hours }}"
|
hour: "{{ youtubedl_cron_hours }}"
|
||||||
|
@ -61,25 +52,9 @@
|
||||||
|
|
||||||
- name: Add logs to logrotate
|
- name: Add logs to logrotate
|
||||||
become: true
|
become: true
|
||||||
blockinfile:
|
file:
|
||||||
path: "/etc/logrotate.d/{{ item }}"
|
path: "/etc/logrotate.d/{{ item }}"
|
||||||
state: present
|
state: absent
|
||||||
create: yes
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
mode: 0644
|
|
||||||
block: |
|
|
||||||
/var/log/{{ item }} {
|
|
||||||
su root root
|
|
||||||
create 0640 root root
|
|
||||||
rotate 4
|
|
||||||
weekly
|
|
||||||
compress
|
|
||||||
missingok
|
|
||||||
notifempty
|
|
||||||
dateext
|
|
||||||
dateyesterday
|
|
||||||
}
|
|
||||||
with_items:
|
with_items:
|
||||||
- sicherung_medien_youtube.log
|
- sicherung_medien_youtube.log
|
||||||
- sicherung_medien_podcast.log
|
- sicherung_medien_podcast.log
|
||||||
|
|
Loading…
Reference in a new issue