ansible/roles/basic/tasks/main.yml

60 lines
1.1 KiB
YAML
Raw Normal View History

2022-08-30 11:03:36 +02:00
- name: install python3
apk:
name: python3
- name: create group 'rilla'
group:
name: rilla
gid: 1000
- name: create user 'rilla'
user:
name: rilla
uid: 1000
group: rilla
home: /home/rilla
groups:
- rilla
- wheel
2022-08-30 14:18:17 +02:00
2022-08-30 14:26:42 +02:00
- name: commit ansible's home to lbu
lbu:
include:
- /home/rilla
exclude:
- /home/rilla/.ash_history
when: ansible_distribution == "Alpine"
2022-08-30 14:18:17 +02:00
- name: create group 'ansible'
group:
name: ansible
gid: 501
- name: create user 'ansible'
user:
name: ansible
uid: 501
group: ansible
home: /var/lib/ansible
password: "*" # disabled password but can be accessed with SSH
groups:
- ansible
- wheel
- name: make sure ansible owns its home
file:
state: directory
path: /var/lib/ansible
owner: ansible
group: ansible
mode: '2755'
- name: commit ansible's home to lbu
lbu:
include:
- /var/lib/ansible
exclude:
- /var/lib/ansible/.ansible
2022-08-30 14:26:42 +02:00
- /var/lib/ansible/.ash_history
2022-08-30 14:18:17 +02:00
when: ansible_distribution == "Alpine"