Skip to content
This repository was archived by the owner on Mar 25, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions solarnet/secrets.yml.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
authorized_keys:
- "ssh-ed25519 AAAACfoobar1234 some-name"

users:
- name: alice
uid: 1040
home: /home/alice
key: ssh-ed25519 AAAAndthepublickey

# the cryptographic and network identity of each host with the cjdns role
# each of them will also be allowed to access /debug on others.
cjdns_identities:
Expand Down
18 changes: 18 additions & 0 deletions solarnet/users.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
- hosts: storage
pre_tasks:
- include_vars: secrets_plaintext/secrets.yml
tasks:
- user:
name: "{{ item.name }}"
uid: "{{ item.uid }}"
home: "{{ item.home }}"
group: users
state: present
with_items: "{{ users }}"
- authorized_key:
user: "{{ item.name }}"
key: "{{ item.key }}"
state: present
exclusive: yes
with_items: "{{ users }}"