36 lines
774 B
YAML
36 lines
774 B
YAML
---
|
|
- name: ensure deploy user exists and is configured properly
|
|
user:
|
|
name: deploy
|
|
uid: 200
|
|
group: operator
|
|
shell: /bin/bash
|
|
home: /var/home/deploy
|
|
createhome: yes
|
|
move_home: yes
|
|
state: present
|
|
|
|
- name: set ownership of deploy home directory
|
|
file:
|
|
dest: /var/home/deploy
|
|
state: directory
|
|
owner: deploy
|
|
group: operator
|
|
mode: 0700
|
|
|
|
- name: create deploy .ssh configuration directory
|
|
file:
|
|
dest: /var/home/deploy/.ssh
|
|
state: directory
|
|
owner: deploy
|
|
group: operator
|
|
mode: 0700
|
|
|
|
- name: write deploy ssh authorized_keys configuration file
|
|
template:
|
|
src: var/home/deploy/ssh/authorized_keys.j2
|
|
dest: /var/home/deploy/.ssh/authorized_keys
|
|
owner: deploy
|
|
group: operator
|
|
mode: 0640
|