mirror of
https://github.com/roles-ansible/ansible_role_forgeo_runner.git
synced 2024-08-16 10:29:50 +02:00
Create forgeo user and group
This commit is contained in:
parent
83c836ec8e
commit
f007a104f7
6 changed files with 38 additions and 8 deletions
2
LICENSE
2
LICENSE
|
@ -1,6 +1,6 @@
|
||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2023 L3D <l3d@c3woc.de>
|
Copyright (c) 2024 L3D <l3d@c3woc.de>
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
13
README.md
13
README.md
|
@ -1,7 +1,10 @@
|
||||||
[![Ansible Galaxy](https://ansible.l3d.space/svg/$namespace.$role.svg)](https://galaxy.ansible.com/ui/standalone/roles/$namespace/$role/)
|
[![Ansible Galaxy](https://ansible.l3d.space/svg/roles-ansible.forgeo_runner.svg)](https://galaxy.ansible.com/ui/standalone/roles/roles-ansible/forgeo_runner/)
|
||||||
[![BSD-3 Clause](https://ansible.l3d.space/svg/$namespace.$role_license.svg)](LICENSE)
|
[![BSD-3 Clause](https://ansible.l3d.space/svg/roles-ansible.forgeo_runner_license.svg)](LICENSE)
|
||||||
[![Maintainance](https://ansible.l3d.space/svg/$namespace.$role_maintainance.svg)](https://ansible.l3d.space/#$namespace.$role)
|
[![Maintainance](https://ansible.l3d.space/svg/roles-ansible.forgeo_runner_maintainance.svg)](https://ansible.l3d.space/#roles-ansible.forgeo_runner)
|
||||||
|
|
||||||
ansible_role_template
|
ansible role forgeo_runner
|
||||||
=======================
|
=======================
|
||||||
Template for Ansible roles
|
Ansible role to install and Setup forgeo runner. (Work in Progress...)
|
||||||
|
|
||||||
|
https://forgejo.org/docs/next/admin/actions/
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
---
|
---
|
||||||
|
forgeo_runner__user: 'forgeo_runner'
|
||||||
|
forgeo_runner__group: 'forgeo_runner'
|
||||||
|
# forgeo_runner__groups
|
||||||
|
forgeo_runner__user_home: '/var/lib/forgeo-runner'
|
||||||
|
|
||||||
# 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 Forgeo runner Group"
|
||||||
|
become: true
|
||||||
|
ansible.builtin.group:
|
||||||
|
name: "{{ forgeo_runner__group }}"
|
||||||
|
system: true
|
||||||
|
state: "present"
|
||||||
|
|
||||||
|
- name: "Create Forgeo runner user"
|
||||||
|
become: true
|
||||||
|
ansible.builtin.user:
|
||||||
|
name: "{{ forgeo_runner__user }}"
|
||||||
|
comment: "Forgeo runner user"
|
||||||
|
group: "{{ forgeo_runner__group }}"
|
||||||
|
groups: "{{ forgeo_runner__groups | default(omit) }}"
|
||||||
|
home: "{{ forgeo_runner__user_home }}"
|
||||||
|
shell: '/usr/sbin/nologin'
|
||||||
|
system: true
|
|
@ -3,3 +3,7 @@
|
||||||
ansible.builtin.include_tasks:
|
ansible.builtin.include_tasks:
|
||||||
file: 'versioncheck.yml'
|
file: 'versioncheck.yml'
|
||||||
when: submodules_versioncheck | bool
|
when: submodules_versioncheck | bool
|
||||||
|
|
||||||
|
- name: Create User ans Group for forgeo runner
|
||||||
|
ansible.builtin.include_tasks:
|
||||||
|
file: '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-l3d.git-forgeo_runner.version'
|
||||||
|
|
Loading…
Reference in a new issue