summaryrefslogtreecommitdiffstats
path: root/roles/user
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2022-11-02 13:08:03 -0400
committerSacha Chua <sacha@sachachua.com>2022-11-02 13:08:03 -0400
commitc569e02d8ab5ebcbb5a44e10c14799fa097c9bc7 (patch)
tree05528005f12160fd505696cb5d89f22d30249f32 /roles/user
parent4696aa1fed214fe1084d7c3deecaaa289bc0a1fd (diff)
downloademacsconf-ansible-c569e02d8ab5ebcbb5a44e10c14799fa097c9bc7.tar.xz
emacsconf-ansible-c569e02d8ab5ebcbb5a44e10c14799fa097c9bc7.zip
OBS overlays, starting to get publish and edit on res
Diffstat (limited to 'roles/user')
-rw-r--r--roles/user/tasks/main.yml31
1 files changed, 31 insertions, 0 deletions
diff --git a/roles/user/tasks/main.yml b/roles/user/tasks/main.yml
new file mode 100644
index 0000000..11c0a74
--- /dev/null
+++ b/roles/user/tasks/main.yml
@@ -0,0 +1,31 @@
+- name: Add group
+ become: yes
+ group:
+ name: "{{ emacsconf_group }}"
+- name: Add user
+ become: yes
+ user:
+ name: "{{ emacsconf_user }}"
+ group: "{{ emacsconf_group }}"
+ shell: /bin/bash
+# password: "{{ emacsconf_unix_password }}"
+- name: Create SSH folder
+ file:
+ path: "/home/{{ emacsconf_user }}/.ssh"
+ owner: "{{ emacsconf_user }}"
+ group: "{{ emacsconf_group }}"
+ state: directory
+ mode: 0700
+- name: Set up SSH key access
+ template:
+ src: authorized_keys
+ dest: "/home/{{ emacsconf_user }}/.ssh/authorized_keys"
+ owner: "{{ emacsconf_user }}"
+ group: "{{ emacsconf_group }}"
+ force: no
+- name: Change ownership of SSH directory
+ file:
+ path: "/home/{{ emacsconf_user }}/.ssh"
+ recurse: true
+ owner: "{{ emacsconf_user }}"
+ mode: "u+rwX,g-rwx,o-rwx"