2019-12-21 18:11:30 +01:00
|
|
|
---
|
|
|
|
- name: Prepare
|
2020-01-11 20:20:52 +01:00
|
|
|
hosts: node1
|
2019-12-21 18:11:30 +01:00
|
|
|
become: true
|
|
|
|
tasks:
|
|
|
|
- name: Ensure a user group exists
|
2020-12-12 15:27:59 +01:00
|
|
|
ansible.builtin.group:
|
2019-12-21 18:11:30 +01:00
|
|
|
name: user
|
|
|
|
state: present
|
|
|
|
|
|
|
|
- name: Ensure a normal user exists
|
2020-12-12 15:27:59 +01:00
|
|
|
ansible.builtin.user:
|
2019-12-21 18:11:30 +01:00
|
|
|
name: k3suser
|
|
|
|
group: user
|
|
|
|
state: present
|
|
|
|
|
|
|
|
- name: Ensure a normal user has bin directory
|
2020-12-12 15:27:59 +01:00
|
|
|
ansible.builtin.file:
|
2019-12-21 18:11:30 +01:00
|
|
|
path: /home/k3suser/bin
|
|
|
|
state: directory
|
|
|
|
owner: k3suser
|
|
|
|
group: user
|
2020-09-26 16:50:03 +02:00
|
|
|
mode: 0700
|