summaryrefslogblamecommitdiffstats
path: root/roles/obs/tasks/user.yml
blob: 00e68a85a8c44ca60a18a65f95919f891cba3c4c (plain) (tree)
1
2
3
4
5
6
7
8






                                  
                    




                                              
                                  





                                                           





                                           











                                              
- 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
  template:
    src: bashrc
    dest: "/home/{{ emacsconf_user }}/.bashrc"
    owner: "{{ emacsconf_user }}"
    group: "{{ emacsconf_group }}"