openneo-health/setup-machine.yml
Emi Matchu fa7893a0a8 Set hostname to health.openneo.net
This doesn't matter-matter, it's just nice for SSH sessions for the
machine to self-report itself as this instead of `localhost`!
2024-06-10 13:08:00 -07:00

35 lines
971 B
YAML

---
- name: Set up host config & user accounts
hosts: health
become: yes
become_user: root
tasks:
- name: Set hostname to health.openneo.net
hostname:
name: health.openneo.net
- name: Create user account for matchu
user:
name: matchu
groups:
- sudo
shell: /bin/bash
comment: Emi Matchu
- name: Create matchu's .ssh folder
file:
name: /home/matchu/.ssh
mode: "700"
owner: matchu
group: matchu
state: directory
- name: Set up matchu's public SSH keys
copy:
dest: /home/matchu/.ssh/authorized_keys
mode: "600"
owner: matchu
group: matchu
content: |
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIu5a+mp2KKSGkOGWQPrARCrsqJS4g2vK7TmRIbj/YBh Matchu's Desktop (Leviathan 2023)
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKFwWryq6slOQqkrJ7HIig7BvEQVQeH19hFwb+9VpXgz Matchu's Laptop (Ebon Hawk)