Fixed path error for templates

This commit is contained in:
2024-07-23 10:53:34 +02:00
parent 5e7397d7be
commit 9290be8110
2 changed files with 7 additions and 7 deletions

View File

@@ -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

View File

@@ -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