From c569e02d8ab5ebcbb5a44e10c14799fa097c9bc7 Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Wed, 2 Nov 2022 13:08:03 -0400 Subject: OBS overlays, starting to get publish and edit on res --- roles/user/tasks/main.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 roles/user/tasks/main.yml (limited to 'roles/user/tasks') 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" -- cgit v1.2.3