blob: 11c0a74f708553779304adb60be2724f7705fa68 (
plain) (
tree)
|
|
- 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"
|