sdf
Some checks failed
ansible-lint / gitleaks (pull_request) Successful in 9s
ansible-lint / Ansible Lint (pull_request) Failing after 1m15s

This commit is contained in:
Michael Grote 2024-10-28 19:30:51 +01:00
parent d4bbcaaa15
commit f4678c5795
4 changed files with 5 additions and 11 deletions

View file

@ -7,10 +7,9 @@ rsync_mirror_timer: '*-*-* *:00/5' #(every 5 minutes)
rsync_mirror_private_key: "{{ lookup('viczem.keepass.keepass', 'rsync_mirror_private_key', 'notes') }}" rsync_mirror_private_key: "{{ lookup('viczem.keepass.keepass', 'rsync_mirror_private_key', 'notes') }}"
rsync_mirror_public_key: "{{ lookup('viczem.keepass.keepass', 'rsync_mirror_public_key', 'notes') }}" rsync_mirror_public_key: "{{ lookup('viczem.keepass.keepass', 'rsync_mirror_public_key', 'notes') }}"
rsync_mirror_destination_host: pbs.mgrote.net
rsync_mirror_dirs: rsync_mirror_dirs:
- src: /hdd_data/tmp # slashes beachten - src: /hdd_data/tmp # slashes beachten
dest: /backup/pve5/tmp dest: {{ rsync_mirror_user }}@mgrote:/backup/pve5/tmp
## todo ssh konfig in datei statt inline? ## todo ssh konfig in datei statt inline?

View file

@ -22,14 +22,14 @@
mode: "0400" mode: "0400"
# no_log: true # tido # no_log: true # tido
- name: Ensure SSH-Config is templated - name: Ensure SSH-Config is templated # todo
become: true become: true
ansible.builtin.template: ansible.builtin.file:
src: ssh-config.j2
dest: "/home/rsync_mirror/.ssh/config" dest: "/home/rsync_mirror/.ssh/config"
owner: "{{ rsync_mirror_user }}" owner: "{{ rsync_mirror_user }}"
group: "{{ rsync_mirror_user_group }}" group: "{{ rsync_mirror_user_group }}"
mode: "0400" mode: "0400"
state: absent
- name: Ensure rsync_mirror-Script is templated - name: Ensure rsync_mirror-Script is templated
become: true become: true

View file

@ -2,5 +2,5 @@
{{ file_header | default () }} {{ file_header | default () }}
{% for item in rsync_mirror_dirs %} {% for item in rsync_mirror_dirs %}
rsync --checksum --dry-run --bwlimit={{ rsync_mirror_bw_limit }} --archive --verbose --human-readable --stats --compress --fuzzy --force --delete-after --recursive {{ item.src }} {{ rsync_mirror_user }}@{{ rsync_mirror_destination_host }}:{{ item.dest }} rsync -e "ssh -i /etc/rsync_mirror/.ssh/id_rsync_mirror -o StrictHostKeyChecking=no" --checksum --dry-run --bwlimit={{ rsync_mirror_bw_limit }} --archive --verbose --human-readable --stats --compress --fuzzy --force --delete-after --recursive {{ item.src }} {{ item.dest }}
{% endfor %} {% endfor %}

View file

@ -1,5 +0,0 @@
### keys
StrictHostKeyChecking=accept-new
Host pbs.mgrote.net
User {{ rsync_mirror_user }}
IdentityFile /etc/rsync_mirror/.ssh/id_rsync_mirror