1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_etebase.git synced 2024-08-16 10:19:52 +02:00

create etebase home

This commit is contained in:
L3D 2022-11-10 00:37:04 +01:00
parent 13b73337fa
commit 6d753ae6fe
Signed by: l3d
GPG key ID: CD08445BFF4313D1
4 changed files with 29 additions and 2 deletions

View file

@ -1,3 +1,9 @@
---
# Unix vars
etebase_group: 'etebase'
etebase_user: 'etebase'
etebase_user_home: '/var/lib/etebase'
etebase_shell: '/bin/false'
# should we do a version check? (recomended)
submodules_versioncheck: false

18
tasks/create_user.yml Normal file
View file

@ -0,0 +1,18 @@
---
- name: "Create EteBase Group"
become: true
ansible.builtin.group:
name: "{{ etebase_group }}"
system: true
state: "present"
- name: "Create Etebase User"
become: true
ansible.builtin.user:
name: "{{ etebase_user }}"
comment: "Etebase User"
group: "{{ etebase_group }}"
groups: "{{ etebase_groups | default(omit) }}"
home: "{{ etebase_user_home }}"
shell: "{{ etebase_shell }}"
system: true

View file

@ -2,3 +2,6 @@
- name: Run optional versionscheck
ansible.builtin.include_tasks: versioncheck.yml
when: submodules_versioncheck | bool
- name: Create Etebase User/Group
ansible.builtin.include_tasks: create_user.yml

View file

@ -1,4 +1,4 @@
---
# versionscheck
playbook_version_number: 02 # should be a integer
playbook_version_path: 'role-<some_unique_string>.version'
playbook_version_number: 03 # should be a integer
playbook_version_path: 'role-etebase'