Add nhadmin ssh directory

This commit is contained in:
iRaven 2024-08-17 04:28:19 -05:00
parent a2b4e96e26
commit 3681d62858

View File

@ -60,7 +60,13 @@
# add to sudo # add to sudo
groups: sudo groups: sudo
append: yes append: yes
# Sysadmin user SSH pub key
# This is a really stupid way to do it, but alas.
# This uses an environment variable named nhadmin_key in Semaphore which has the ssh-rsa pubkey.
- name: Create deployment user .ssh directory.
file:
path: /home/ansible/.ssh
state: directory
- name: Add nhadmin user's SSH key. - name: Add nhadmin user's SSH key.
shell: shell:
cmd: echo "{{ nhadmin_key }}" > /home/nhadmin/.ssh/authorized_keys cmd: echo "{{ nhadmin_key }}" > /home/nhadmin/.ssh/authorized_keys