2022-09-04 17:25:14 +02:00
|
|
|
---
|
2022-08-30 14:43:41 +02:00
|
|
|
- name: create group 'rilla'
|
|
|
|
group:
|
|
|
|
name: rilla
|
|
|
|
gid: 1000
|
|
|
|
|
|
|
|
- name: create user 'rilla'
|
|
|
|
user:
|
|
|
|
name: rilla
|
|
|
|
uid: 1000
|
|
|
|
group: rilla
|
|
|
|
home: /home/rilla
|
|
|
|
groups:
|
2022-08-30 18:26:16 +02:00
|
|
|
- deploy
|
2022-08-30 14:43:41 +02:00
|
|
|
- wheel
|
2022-09-04 17:25:14 +02:00
|
|
|
append: true
|
2022-08-30 14:43:41 +02:00
|
|
|
|
2022-08-30 18:26:16 +02:00
|
|
|
- name: additional groups to rilla
|
|
|
|
user:
|
|
|
|
name: rilla
|
|
|
|
groups: "{{item}}"
|
2022-09-04 17:25:14 +02:00
|
|
|
append: true
|
2022-08-30 18:26:16 +02:00
|
|
|
when: item in ansible_facts.getent_group
|
|
|
|
with_items:
|
|
|
|
- docker
|
|
|
|
|
2022-08-30 14:43:41 +02:00
|
|
|
- name: make sure rilla owns its home
|
|
|
|
file:
|
|
|
|
state: directory
|
|
|
|
path: /home/rilla
|
|
|
|
owner: rilla
|
|
|
|
group: rilla
|
|
|
|
mode: '2755'
|
|
|
|
|
2022-08-30 15:10:01 +02:00
|
|
|
- name: commit rilla's home to lbu
|
|
|
|
lbu:
|
|
|
|
include:
|
|
|
|
- /home/rilla
|
|
|
|
exclude:
|
|
|
|
- /home/rilla/.ash_history
|
2022-10-19 17:58:20 +02:00
|
|
|
when: ansible_distribution == "Alpine" and alpine_mode == "diskless"
|