use ssh keys

This commit is contained in:
Torma Kristóf 2022-02-05 21:00:03 +01:00
parent 525db9dfd8
commit ae7eb2bd40
4 changed files with 19 additions and 8 deletions

View File

@ -5,6 +5,6 @@
- include_tasks: remove-snap.yaml
- include_tasks: disable-cloudinit.yaml
- include_tasks: ufw.yaml
- include_tasks: service-user.yaml
- include_tasks: user-ops.yaml
- include_tasks: ssh-security-settings.yaml
- include_tasks: timesync.yaml

View File

@ -1,7 +0,0 @@
---
- name: "Add service user with docker group membership"
ansible.builtin.user:
name: service-user
comment: Service user
groups: docker
append: yes

View File

@ -0,0 +1,11 @@
---
- name: "Add service user"
ansible.builtin.user:
name: service-user
comment: Service user
- name: "Update authorized_keys of tormakris"
ansible.posix.authorized_key:
user: tormakris
state: present
key: https://static.tormakristof.eu/ssh.keys

View File

@ -20,6 +20,13 @@
state: restarted
enabled: yes
- name: "Add service user to docker group"
ansible.builtin.user:
name: service-user
comment: Service user
groups: docker
append: yes
- name: Copy docker-compose.yml to target
copy:
src: "{{ dockercompose_yml_name }}"