fix: use site user as ssh config owner

This commit is contained in:
moanos [he/him] 2023-11-10 15:00:51 +01:00
parent 436eb2a07d
commit 80c0916e9e

View File

@ -9,7 +9,7 @@
ansible.builtin.file: path="{{ static_site_server_base_path }}/{{ site.user }}/public" owner="{{ site.user }}" group="{{ site.user }}" mode=0700 state=directory
- name: Ensure .ssh path is present
ansible.builtin.file: path="{{ static_site_server_base_path }}/{{ site.user }}/.ssh" owner="{{ static_site_user }}" group="{{ static_site_group }}" mode=0700 state=directory
ansible.builtin.file: path="{{ static_site_server_base_path }}/{{ site.user }}/.ssh" owner="{{ site.user }}" group="{{ site.user }}" mode=0700 state=directory
- name: Seting up authorized keys
ansible.posix.authorized_key:
@ -18,4 +18,4 @@
state: present
- name: Ensure correct permissions for authorized keys file
ansible.builtin.file: path="{{ static_site_server_base_path }}/{{ site.user }}/.ssh/authorized_keys" owner="{{ static_site_user }}" group="{{ static_site_group }}" mode=0600 state=file
ansible.builtin.file: path="{{ static_site_server_base_path }}/{{ site.user }}/.ssh/authorized_keys" owner="{{ site.user }}" group="{{ site.user }}" mode=0600 state=file