mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-12-23 02:45:02 +01:00
Implemented role native-pull-remote-backups
This commit is contained in:
parent
c6bf70cebb
commit
fa21feac87
4
roles/native-pull-remote-backups/handlers/main.yml
Normal file
4
roles/native-pull-remote-backups/handlers/main.yml
Normal file
@ -0,0 +1,4 @@
|
||||
- name: restart pull-remote-backups service
|
||||
service: name=pull-remote-backups.service state=restarted enabled=yes
|
||||
- name: restart pull-remote-backups timer
|
||||
service: name=pull-remote-backups.timer state=restarted enabled=yes
|
2
roles/native-pull-remote-backups/meta/main.yml
Normal file
2
roles/native-pull-remote-backups/meta/main.yml
Normal file
@ -0,0 +1,2 @@
|
||||
dependencies:
|
||||
- native-git
|
13
roles/native-pull-remote-backups/tasks/main.yml
Normal file
13
roles/native-pull-remote-backups/tasks/main.yml
Normal file
@ -0,0 +1,13 @@
|
||||
- name: pull-remote-backups git
|
||||
git:
|
||||
repo: "https://github.com/kevinveenbirkenbach/pull-remote-backup.git"
|
||||
dest: "/usr/local/bin/pull-remote-backup"
|
||||
update: yes
|
||||
|
||||
- name: configure pull-remote-backups.service.tpl
|
||||
template: src=pull-remote-backups.service dest=/etc/systemd/system/pull-remote-backups.service
|
||||
notify: restart pull-remote-backups service
|
||||
|
||||
- name: configure pull-remote-backups.timer.tpl
|
||||
template: src=pull-remote-backups.timer dest=/etc/systemd/system/pull-remote-backups.timer
|
||||
notify: restart pull-remote-backups timer
|
@ -0,0 +1,6 @@
|
||||
[Unit]
|
||||
Description=docker volume update
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=hosts="{{pull_remote_backups_hosts}}";for host in $hosts; do /usr/bin/bash /usr/local/bin/pull-remote-backup/pull-remote-backup.sh $host; done;
|
@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=pulls a remote backup
|
||||
|
||||
[Timer]
|
||||
OnCalendar=22:00
|
||||
RandomizedDelaySec=1h
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
@ -1,3 +1,4 @@
|
||||
# Role Administrator
|
||||
This role creates an standard administrator user.
|
||||
For security reasons it's recommended to use this user instead of the standard root user.
|
||||
For security reasons it's recommended to use this user instead of the standard root user.
|
||||
Please consider the concerns in this article https://unix.stackexchange.com/questions/92123/rsync-all-files-of-remote-machine-over-ssh-without-root-user.
|
||||
|
Loading…
Reference in New Issue
Block a user