Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[POC] Integration of OneDrive + Rsync #129

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ansible/roles/common/files/ssh/.ssh/config
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
StrictHostKeyChecking no
38 changes: 38 additions & 0 deletions ansible/roles/common/files/ssh/.ssh/id_rsa
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABlwAAAAdzc2gtcn
NhAAAAAwEAAQAAAYEAt289mqDBJJ8M+BTxfeVxZmwdsKrifZwANZfrDEtnZUXvi9oJTUGb
amz/EAEnK3CjV8lNvrY1uSTo8qn6eWeU9xADadxdlOcwWKcRueACmeRRMJCrhFxNJQdAWa
mpdHyI+t/jmcaRK08yROHSa1pG9s6RrLbtZw5xIquUhrvRhicpM29njktzAJVqY55Sfm0H
PI3m4BUOr2h2zieenK6CCEddrMR74WwzfDcfgckD8UGxHyFMu384185mecF4pSPYRcfJJz
xNt8o978yR7ImrwhAdBXbe0mNpveL8aUvWq0MLlHyM0bjI9QN3H51j3biYM5fem/BMj0kJ
LNPfWNgDlpn2pmjN1nTtgYJm7R9X5bEguTzpYb1B2eyFdNw6Gs0XRB2r9L6FiRKIo7rf/W
BpWr/QqSID5ih4kqvkql2llXan013E1ZacXaDR44uD+7P5eGALSrjFNfjjVD/9jcUfeRfz
b/XulQ1Gyg2dJff8ZzBW48eVHTW2nDR9EQGQuXeZAAAFgPNCwrLzQsKyAA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AAA
wHV5OQOSfBh4A0SvHRp3vCXBDlHXjXJz8b8Tld2kHmwPEsMkRXfocDRtZTFj/at4fYDRg8
2qVgswlZn3p9GYVuUPnjaHmIv71hFDOKHgrlULlDS/y+YhnSN/cLgEHUuZPs3l4qXAM75D
qzbL2pkkcjk80BToBcHXBeDorpFDa9s367kfQ+zvNwHRfjpjaJ3QbGr6x7rQ0uVuwo4UnU
3Xj+Q6YdY5lc5Y71MnBCNoG6Gwu/yV1Gc7lqoDgwY+yBMHewAAAMEA3Bq++gZBmUV0p9yz
gOeusoTUyWvKHk3PAlSY0zmZ3F4L90pbVdZhAOW7YOQ4dzXJrOZbMCv5FHdTgmwsN6LiUb
VGkXkizYdgdeaiwmmc8MHBZjEv6ckPRJCjJNe7ij9T8F0h/X33MucFwz5ATRrvHxXlcr4b
UwidK/s0TcneS+xPvV6vIMW6RlAxkL3imIL1ZtgKP28FBeowg9xy1ysLjOfzuDuVHceqsX
KV7ZYmcKDiRp0IH1TLygs4u22UArYfAAAAwQDVWYrhZDlaRTtXaIJC8PAqv/2cpHI9L7dA
hjBC+hX8fk8QUvObvKnbLYzbHsMqTG5A309YRXA1Q7k1K4sldI1heD/lDyaftLQzERllpR
s8uAOgLLDC4qOz/AykzLKGvtrT8g2OQs692A7ZghKJ+frErIv8wmQGb9zU3+ytIiVqFlvs
oBMR/8N1zKH/15xxwi+W0PfYYIQ/ZgZPGlpopvDmmb9IBR9K9F556aw7307vV8sZy9cIpX
XLSqLiov7ma0cAAAAKcGlAZWxpbXVwaQE=
-----END OPENSSH PRIVATE KEY-----
1 change: 1 addition & 0 deletions ansible/roles/common/files/ssh/.ssh/id_rsa.pub
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC3bz2aoMEknwz4FPF95XFmbB2wquJ9nAA1l+sMS2dlRe+L2glNQZtqbP8QAScrcKNXyU2+tjW5JOjyqfp5Z5T3EANp3F2U5zBYpxG54AKZ5FEwkKuEXE0lB0BZqal0fIj63+OZxpErTzJE4dJrWkb2zpGstu1nDnEiq5SGu9GGJykzb2eOS3MAlWpjnlJ+bQc8jebgFQ6vaHbOJ56croIIR12sxHvhbDN8Nx+ByQPxQbEfIUy7fzjXzmZ5wXilI9hFx8knPE23yj3vzJHsiavCEB0Fdt7SY2m94vxpS9arQwuUfIzRuMj1A3cfnWPduJgzl96b8EyPSQks099Y2AOWmfamaM3WdO2BgmbtH1flsSC5POlhvUHZ7IV03DoazRdEHav0voWJEoijut/9YGlav9CpIgPmKHiSq+SqXaWVdqfTXcTVlpxdoNHji4P7s/l4YAtKuMU1+ONUP/2NxR95F/Nv9e6VDUbKDZ0l9/xnMFbjx5UdNbacNH0RAZC5d5k= pi@elimupi
3 changes: 3 additions & 0 deletions ansible/roles/common/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,8 @@
# release file
- include_tasks: release.yml

# rsync
- include_tasks: rsync.yml

# reboot
- include_tasks: reboot.yml
11 changes: 11 additions & 0 deletions ansible/roles/common/tasks/rsync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
- name: setup cron job
ansible.builtin.cron:
name: content rsync
job: "/usr/bin/flock -n /tmp/rsync.lock -c 'rsync -avz --delete [email protected]:/mnt/content/* /mnt/content/' >> /mnt/content/rsync.log"
user: "pi"

- name: Copy certificates
ansible.builtin.copy:
src: ssh/.ssh
dest: /home/pi/