From 11ae5aa962a46687b4f2ab42901ef52664643c2e Mon Sep 17 00:00:00 2001 From: Riku Rouvila Date: Fri, 22 Dec 2023 16:12:39 +0200 Subject: [PATCH] add tags --- infrastructure/server-setup/backups.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/infrastructure/server-setup/backups.yml b/infrastructure/server-setup/backups.yml index 2508145fb..d247ce576 100644 --- a/infrastructure/server-setup/backups.yml +++ b/infrastructure/server-setup/backups.yml @@ -11,6 +11,8 @@ tasks: - name: Generate SSH keypair for application -> backup server connection command: ssh-keygen -t rsa -b 4096 -f /tmp/backup_ssh_key -N "" + tags: + - backups - hosts: docker-manager-first tasks: @@ -18,6 +20,8 @@ stat: path: /home/{{ ansible_user }}/.ssh/id_rsa register: file_check + tags: + - backups - name: Ensure application server can login to backup server copy: @@ -25,6 +29,8 @@ dest: /home/{{ ansible_user }}/.ssh/id_rsa mode: 0600 when: not file_check.stat.exists + tags: + - backups - hosts: backups become: yes @@ -34,11 +40,15 @@ user: name: '{{ external_backup_server_user }}' state: present + tags: + - backups - name: Check if authorized_keys already exists stat: path: /home/{{ external_backup_server_user }}/.ssh/authorized_keys register: file_check + tags: + - backups - name: Ensure backup application servers can login to backup server copy: @@ -46,9 +56,13 @@ dest: /home/{{ external_backup_server_user }}/.ssh/authorized_keys mode: 0600 when: not file_check.stat.exists + tags: + - backups - name: 'Create backup directory' file: path: '{{ external_backup_server_remote_directory }}' state: directory owner: '{{ external_backup_server_user }}' + tags: + - backups