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:
parent
13b73337fa
commit
6d753ae6fe
4 changed files with 29 additions and 2 deletions
|
@ -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)
|
# should we do a version check? (recomended)
|
||||||
submodules_versioncheck: false
|
submodules_versioncheck: false
|
||||||
|
|
18
tasks/create_user.yml
Normal file
18
tasks/create_user.yml
Normal 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
|
|
@ -2,3 +2,6 @@
|
||||||
- name: Run optional versionscheck
|
- name: Run optional versionscheck
|
||||||
ansible.builtin.include_tasks: versioncheck.yml
|
ansible.builtin.include_tasks: versioncheck.yml
|
||||||
when: submodules_versioncheck | bool
|
when: submodules_versioncheck | bool
|
||||||
|
|
||||||
|
- name: Create Etebase User/Group
|
||||||
|
ansible.builtin.include_tasks: create_user.yml
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
---
|
---
|
||||||
# versionscheck
|
# versionscheck
|
||||||
playbook_version_number: 02 # should be a integer
|
playbook_version_number: 03 # should be a integer
|
||||||
playbook_version_path: 'role-<some_unique_string>.version'
|
playbook_version_path: 'role-etebase'
|
||||||
|
|
Loading…
Reference in a new issue