summaryrefslogtreecommitdiffstats
path: root/roles/obs/tasks/user.yml
blob: 187edb23973140904c1e5d4d6c692467ced1e88d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
- name: Add group 
  group:
    name: "{{ emacsconf_group }}"
- name: Add user
  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: 700
- name: Set up SSH key access
  template:
    src: authorized_keys
    dest: "/home/{{ emacsconf_user }}/.ssh/authorized_keys"
- name: Change ownership of SSH directory
  file:
    path: "/home/{{ emacsconf_user }}/.ssh"
    recurse: true
    owner: "{{ emacsconf_user }}"
    mode: "u+rwX,g-rwx,o-rwx"
- name: Create bin dir
  file:
    path: "/home/{{ emacsconf_user }}/bin"
    state: directory
    owner: "{{ emacsconf_user }}"
- name: Set up bashrc
  tags: wip
  template:
    src: bashrc
    dest: "/home/{{ emacsconf_user }}/.bashrc"
    owner: "{{ emacsconf_user }}"
    group: "{{ emacsconf_group }}"