1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_forgeo_runner.git synced 2024-07-07 00:08:53 +02:00

Create forgeo user and group

This commit is contained in:
L3D 2024-03-19 14:39:34 +01:00
parent 83c836ec8e
commit f007a104f7
Signed by: l3d
GPG key ID: CD08445BFF4313D1
6 changed files with 38 additions and 8 deletions

View file

@ -1,6 +1,6 @@
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
of this software and associated documentation files (the "Software"), to deal

View file

@ -1,7 +1,10 @@
[![Ansible Galaxy](https://ansible.l3d.space/svg/$namespace.$role.svg)](https://galaxy.ansible.com/ui/standalone/roles/$namespace/$role/)
[![BSD-3 Clause](https://ansible.l3d.space/svg/$namespace.$role_license.svg)](LICENSE)
[![Maintainance](https://ansible.l3d.space/svg/$namespace.$role_maintainance.svg)](https://ansible.l3d.space/#$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/roles-ansible.forgeo_runner_license.svg)](LICENSE)
[![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/

View file

@ -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)
submodules_versioncheck: false

18
tasks/create_user.yml Normal file
View 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

View file

@ -3,3 +3,7 @@
ansible.builtin.include_tasks:
file: 'versioncheck.yml'
when: submodules_versioncheck | bool
- name: Create User ans Group for forgeo runner
ansible.builtin.include_tasks:
file: '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-l3d.git-forgeo_runner.version'