Fixed authorized_keys configuration drift, and change repo directory from hostname to fqdn
This commit is contained in:
parent
42790f21cd
commit
f084bd976c
8 changed files with 36 additions and 26 deletions
3
templates/authorized_keys
Normal file
3
templates/authorized_keys
Normal file
|
@ -0,0 +1,3 @@
|
|||
{% for client in borg.server.clients %}
|
||||
command="borg serve --restrict-to-path /srv/borg/repos/{{ client.hostname }}",restrict {{ client.pubkey }}
|
||||
{% endfor %}
|
|
@ -15,13 +15,13 @@ export BORG_RSH="ssh -i /root/.ssh/borg"
|
|||
{{ job.pre_command }}
|
||||
{% endif %}
|
||||
{% if job.command_to_pipe is defined %}
|
||||
{{ job.command_to_pipe }} | borg create borg@{{ borg_server }}:/srv/borg/repos/{{ ansible_hostname }}::{{ job.name }}-{now} -
|
||||
{{ job.command_to_pipe }} | borg create borg@{{ borg_server }}:/srv/borg/repos/{{ inventory_hostname }}::{{ job.name }}-{now} -
|
||||
{% else %}
|
||||
borg create {% for exclude in job.exclude|default([]) %} --exclude {{ exclude }}{% endfor %} borg@{{ borg_server }}:/srv/borg/repos/{{ ansible_hostname }}::{{ job.name }}-{now} {{ job.path }}
|
||||
borg create {% for exclude in job.exclude|default([]) %} --exclude {{ exclude }}{% endfor %} borg@{{ borg_server }}:/srv/borg/repos/{{ inventory_hostname }}::{{ job.name }}-{now} {{ job.path }}
|
||||
{% endif %}
|
||||
{% if job.post_command is defined %}
|
||||
{{ job.post_command }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
borg prune borg@{{ borg_server }}:/srv/borg/repos/{{ ansible_hostname }} {{ borg_prune_arguments }}
|
||||
borg prune borg@{{ borg_server }}:/srv/borg/repos/{{ inventory_hostname }} {{ borg_prune_arguments }}
|
||||
|
|
Reference in a new issue