From c6e51fa419594062df334acb766749b4ef3b05dc Mon Sep 17 00:00:00 2001 From: Caila Finn Date: Fri, 20 Sep 2024 16:22:58 +0100 Subject: [PATCH] Clone the data from the linode onto this node RE #99 --- .../external-data-mirror/ansible/roles/mirror/tasks/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Linux/external-data-mirror/ansible/roles/mirror/tasks/main.yml b/Linux/external-data-mirror/ansible/roles/mirror/tasks/main.yml index b1e2ddb..8a141a2 100644 --- a/Linux/external-data-mirror/ansible/roles/mirror/tasks/main.yml +++ b/Linux/external-data-mirror/ansible/roles/mirror/tasks/main.yml @@ -1,9 +1,11 @@ - name: Create a directory to hold the mirror of the external data. ansible.builtin.file: - path: /external-data/ + path: /external-data/MD5/ state: directory mode: '0755' - name: Exchange SSH keys with linode so we can access the data. import_tasks: exchange-keys.yml +- name: Mirror the external data from the main server (this may take a while). + command: "rsync -az --perms -o -g {{ main_server_ip }}:/srv/{{ main_server_ip }}/ftp/external-data/MD5/ /external-data/MD5/" \ No newline at end of file