42 lines
813 B
YAML
42 lines
813 B
YAML
---
|
|
- name: create group 'btrbk'
|
|
group:
|
|
name: btrbk
|
|
gid: 505
|
|
|
|
- name: create user 'btrbk'
|
|
user:
|
|
name: btrbk
|
|
uid: 505
|
|
group: btrbk
|
|
home: /var/lib/btrbk
|
|
password: "*" # disabled password but can be accessed with SSH
|
|
groups:
|
|
- wheel
|
|
append: true
|
|
|
|
- name: additional groups to btrbk
|
|
user:
|
|
name: btrbk
|
|
groups: "{{item}}"
|
|
append: true
|
|
when: item in ansible_facts.getent_group
|
|
with_items:
|
|
- syslog
|
|
|
|
- name: make sure btrbk owns its home
|
|
file:
|
|
state: directory
|
|
path: /var/lib/btrbk
|
|
owner: btrbk
|
|
group: btrbk
|
|
mode: '2755'
|
|
|
|
- name: commit btrbk's home to lbu
|
|
lbu:
|
|
include:
|
|
- /var/lib/btrbk
|
|
exclude:
|
|
- /var/lib/btrbk/.ash_history
|
|
when: ansible_distribution == "Alpine" and alpine_mode in ["diskless", "data"]
|