web-logs: Initial version of role
This commit is contained in:
parent
8a2471f932
commit
8f54421d17
4 changed files with 108 additions and 0 deletions
10
roles/web-logs/templates/rclone.conf.j2
Normal file
10
roles/web-logs/templates/rclone.conf.j2
Normal file
|
@ -0,0 +1,10 @@
|
|||
# {{ ansible_managed }}
|
||||
{% for host in groups['webservers'] %}
|
||||
|
||||
[{{ host.split('.')[0] }}]
|
||||
type = sftp
|
||||
host = {{ host }}
|
||||
user = logsync
|
||||
key_file = ~/.ssh/id_ed25519
|
||||
known_hosts_file = /etc/ssh/ssh_known_hosts
|
||||
{% endfor %}
|
5
roles/web-logs/templates/ssh_known_hosts.j2
Normal file
5
roles/web-logs/templates/ssh_known_hosts.j2
Normal file
|
@ -0,0 +1,5 @@
|
|||
{% for host, vars in hostvars|dictsort %}
|
||||
{% if vars["ansible_ssh_host_key_ed25519_public"] is defined %}
|
||||
{{ host }} ssh-ed25519 {{ vars["ansible_ssh_host_key_ed25519_public"] }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
Loading…
Add table
Add a link
Reference in a new issue