summaryrefslogtreecommitdiff
path: root/roles/essential/tasks/users.yml
diff options
context:
space:
mode:
authorDmitry Ilvokhin <d@ilvokhin.com>2023-12-19 17:14:50 +0000
committerDmitry Ilvokhin <d@ilvokhin.com>2023-12-19 17:14:50 +0000
commit7428c86dd779a4a7938d461ee5bc0105546815f0 (patch)
tree50a6c68a7324334f467bb196318a248234c3fe8d /roles/essential/tasks/users.yml
parentb1198d5bc54bcda6e6eed5cf7b559a33eeb875f5 (diff)
downloadinfra-7428c86dd779a4a7938d461ee5bc0105546815f0.tar.gz
infra-7428c86dd779a4a7938d461ee5bc0105546815f0.tar.bz2
infra-7428c86dd779a4a7938d461ee5bc0105546815f0.zip
Split essential task into packages and users
Diffstat (limited to 'roles/essential/tasks/users.yml')
-rw-r--r--roles/essential/tasks/users.yml27
1 files changed, 27 insertions, 0 deletions
diff --git a/roles/essential/tasks/users.yml b/roles/essential/tasks/users.yml
new file mode 100644
index 0000000..add5757
--- /dev/null
+++ b/roles/essential/tasks/users.yml
@@ -0,0 +1,27 @@
+- name: Remove default arch user
+ ansible.builtin.user:
+ name: arch
+ state: absent
+
+- name: Create user for Dmitry Ilvokhin
+ ansible.builtin.user:
+ name: d
+ home: /home/d
+ groups:
+ - wheel
+
+- name: Setup SSH directory for Dmitry Ilvokhin
+ ansible.builtin.file:
+ path: /home/d/.ssh
+ state: directory
+ owner: d
+ group: d
+ mode: u+rw,g-wx,o-rwx
+
+- name: Update authorized_keys for Dmitry Ilvokhin
+ ansible.builtin.copy:
+ src: roles/essential/files/id_rsa.pub
+ dest: /home/d/.ssh/authorized_keys
+ owner: d
+ group: d
+ mode: u+rw,g-rwx,o-rwx