ansible/roles/users/tasks/rilla.yml

42 lines
722 B
YAML

---
- name: create group 'rilla'
group:
name: rilla
gid: 1000
- name: create user 'rilla'
user:
name: rilla
uid: 1000
group: rilla
home: /home/rilla
groups:
- deploy
- wheel
append: true
- name: additional groups to rilla
user:
name: rilla
groups: "{{item}}"
append: true
when: item in ansible_facts.getent_group
with_items:
- docker
- name: make sure rilla owns its home
file:
state: directory
path: /home/rilla
owner: rilla
group: rilla
mode: '2755'
- name: commit rilla's home to lbu
lbu:
include:
- /home/rilla
exclude:
- /home/rilla/.ash_history
when: ansible_distribution == "Alpine" and use_lbu