From 9290be8110f3268e2de1d43cbd4971ed5f9c840c Mon Sep 17 00:00:00 2001 From: Mateo Date: Tue, 23 Jul 2024 10:53:34 +0200 Subject: [PATCH] Fixed path error for templates --- tasks/install_caddy.yml | 6 +++--- tasks/setup_ssh.yml | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tasks/install_caddy.yml b/tasks/install_caddy.yml index a25b68b..79ec97e 100644 --- a/tasks/install_caddy.yml +++ b/tasks/install_caddy.yml @@ -26,12 +26,12 @@ - name: Editing Caddyfile to setup the reverse_proxy ansible.builtin.template: - src: templates/Caddyfile.j2 + src: ../templates/Caddyfile.j2 dest: /etc/caddy/Caddyfile - name: Put the service binary on the remote server ansible.builtin.copy: - src: files/usertwist + src: ../files/usertwist dest: /usr/local/bin owner: root group: root @@ -39,7 +39,7 @@ - name: Put the service systemd file on the remote server ansible.builtin.copy: - src: files/usertwist.service + src: ../files/usertwist.service dest: /etc/systemd/system owner: root group: root diff --git a/tasks/setup_ssh.yml b/tasks/setup_ssh.yml index de9c255..932bcdb 100644 --- a/tasks/setup_ssh.yml +++ b/tasks/setup_ssh.yml @@ -9,19 +9,19 @@ - name: Get SSH Private Key ansible.builtin.fetch: - dest: "keys/" + dest: "../keys/" src: "~/ssh_key" flat: true - name: Get SSH Public Key ansible.builtin.fetch: - dest: "keys/" + dest: "../keys/" src: "~/ssh_key.pub" flat: true - name: Copy new SSH configuration ansible.builtin.template: - src: "templates/sshd_config.j2" + src: "../templates/sshd_config.j2" dest: "/etc/ssh/sshd_config" - name: Create new user @@ -40,7 +40,7 @@ - name: Add SSH public key to remote host ansible.builtin.authorized_key: user: "motysten" - key: "{{ lookup('file', 'keys/ssh_key.pub') }}" + key: "{{ lookup('file', '../keys/ssh_key.pub') }}" become: true - name: Restart SSH Services