Skip to content
Extraits de code Groupes Projets
Valider d6ddb634 rédigé par Rémi - Le Filament's avatar Rémi - Le Filament
Parcourir les fichiers

Add check to not push backups if Backup_Server

parent daf7cf08
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -24,8 +24,10 @@ printf "\n\n-- Usage Statistics --\n" >> $file ...@@ -24,8 +24,10 @@ printf "\n\n-- Usage Statistics --\n" >> $file
cp $file $latest_file cp $file $latest_file
chmod 644 $file $latest_file chmod 644 $file $latest_file
{% for host in groups.backup_server %} {% for host in groups.backup_server %}
{% if host != inventory_hostname %}
sftp -P {{ default_sshd_port }} -o IdentityFile=/home/{{ host_user }}/.ssh/id_ed25519 {{ backup_sftp_user }}@{{ hostvars[host].ansible_host }} << COMMANDS sftp -P {{ default_sshd_port }} -o IdentityFile=/home/{{ host_user }}/.ssh/id_ed25519 {{ backup_sftp_user }}@{{ hostvars[host].ansible_host }} << COMMANDS
put $file {{ inventory_hostname|lower }}/ put $file {{ inventory_hostname|lower }}/
quit quit
COMMANDS COMMANDS
{% endif %}
{% endfor %} {% endfor %}
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter