summaryrefslogtreecommitdiff
path: root/roles
diff options
context:
space:
mode:
authorDmitry Ilvokhin <d@ilvokhin.com>2026-09-26 17:10:04 +0100
committerDmitry Ilvokhin <d@ilvokhin.com>2026-09-26 17:10:04 +0100
commita3b94781536725f8d2ccea35999aa21c6dad6451 (patch)
tree77a7f7e0d849cbb76256265e5a54e24614c6d6ee /roles
parentab3f35f38567f8158fe33272c36d31b1db5cb839 (diff)
downloadinfra-a3b94781536725f8d2ccea35999aa21c6dad6451.tar.gz
infra-a3b94781536725f8d2ccea35999aa21c6dad6451.tar.bz2
infra-a3b94781536725f8d2ccea35999aa21c6dad6451.zip
Add a user for Anastasiia Semenova at mountain
Diffstat (limited to 'roles')
-rw-r--r--roles/ssh/tasks/main.yml22
-rw-r--r--roles/users/tasks/main.yml6
2 files changed, 28 insertions, 0 deletions
diff --git a/roles/ssh/tasks/main.yml b/roles/ssh/tasks/main.yml
index 0e2fdbf..24b50da 100644
--- a/roles/ssh/tasks/main.yml
+++ b/roles/ssh/tasks/main.yml
@@ -23,3 +23,25 @@
name: sshconfig
tags:
- dotfiles
+
+- name: Setup SSH directory for Anastasiia Semenova
+ ansible.builtin.file:
+ path: /home/a/.ssh
+ state: directory
+ owner: a
+ group: a
+ mode: u+rw,g-wx,o-rwx
+ when: inventory_hostname in groups['home']
+ tags:
+ - dotfiles
+
+- name: Update authorized_keys for Anastasiia Semenova
+ ansible.posix.authorized_key:
+ user: a
+ state: present
+ key: "{{ lookup('file', item) }}"
+ with_fileglob:
+ - misc/pubkeys/a/*.pub
+ when: inventory_hostname in groups['home']
+ tags:
+ - dotfiles
diff --git a/roles/users/tasks/main.yml b/roles/users/tasks/main.yml
index f3df2df..6906823 100644
--- a/roles/users/tasks/main.yml
+++ b/roles/users/tasks/main.yml
@@ -14,3 +14,9 @@
# Group http required to deploy websites with rsync under personal
# username.
- http
+
+- name: Create user for Anastasiia Semenova
+ ansible.builtin.user:
+ name: a
+ home: /home/a
+ when: inventory_hostname in groups['home']