home.nas: move cron jobs to systemd timers
This commit is contained in:
parent
0674b3f8db
commit
46e6b0f704
1 changed files with 17 additions and 13 deletions
|
@ -62,19 +62,6 @@ nodes['home.nas'] = {
|
||||||
# 'my_ssh_port': 2022,
|
# 'my_ssh_port': 2022,
|
||||||
# 'zfs-base': 'storage/backups',
|
# 'zfs-base': 'storage/backups',
|
||||||
#},
|
#},
|
||||||
'cron': {
|
|
||||||
'jobs': {
|
|
||||||
# Ensure every user is able to read and write to the NAS dataset.
|
|
||||||
'nas_permissions': '0 3 * * * root '
|
|
||||||
'chown -R :nas /storage/nas/ && '
|
|
||||||
'find /storage/nas/ -type d -exec chmod 0775 {} \; && '
|
|
||||||
'find /storage/nas/ -type f -exec chmod 0664 {} \;',
|
|
||||||
'nas_mixcloud': vault.decrypt('encrypt$gAAAAABgxFkM0Zd8SOhk8aK_zsUY5S39FvyxvEq9TVnAK-ryn9qjrpziqUgNyPXFQBSUHPCV5DX6CW6iSQFGO54truPoaymdHFwchWh3u6bOar_h8x3er3I=').format_into(
|
|
||||||
'0 2 * * * kunsi '
|
|
||||||
'cd /storage/nas/Musik/Compilations && '
|
|
||||||
'wget --mirror --page-requisites --convert-links --domains {0} --execute robots=off https://{0}/'),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
'groups': {
|
'groups': {
|
||||||
'nas': {},
|
'nas': {},
|
||||||
},
|
},
|
||||||
|
@ -190,6 +177,23 @@ nodes['home.nas'] = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
'systemd-timers': {
|
||||||
|
'timers': {
|
||||||
|
# Ensure every user is able to read and write to the NAS dataset.
|
||||||
|
'nas_permissions': {
|
||||||
|
'command': 'chown -R :nas /storage/nas/ && '
|
||||||
|
'find /storage/nas/ -type d -exec chmod 0775 {} \; && '
|
||||||
|
'find /storage/nas/ -type f -exec chmod 0664 {} \;',
|
||||||
|
'when': '*-*-* 03:00:00',
|
||||||
|
},
|
||||||
|
'nas_mixcloud': {
|
||||||
|
'command': vault.decrypt('encrypt$gAAAAABgxFkM0Zd8SOhk8aK_zsUY5S39FvyxvEq9TVnAK-ryn9qjrpziqUgNyPXFQBSUHPCV5DX6CW6iSQFGO54truPoaymdHFwchWh3u6bOar_h8x3er3I=').format_into('wget --mirror --page-requisites --convert-links --domains {0} --execute robots=off https://{0}/'),
|
||||||
|
'pwd': '/storage/nas/Musik/Compilations',
|
||||||
|
'user': 'kunsi',
|
||||||
|
'when': '*-*-* 02:00:00',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
'openssh': {
|
'openssh': {
|
||||||
'allowed_users': {
|
'allowed_users': {
|
||||||
'kunsi-t470', # backup user
|
'kunsi-t470', # backup user
|
||||||
|
|
Loading…
Reference in a new issue