Compare commits

...

No commits in common. "main" and "docs" have entirely different histories.
main ... docs

17 changed files with 194 additions and 469 deletions

13
.gitignore vendored
View File

@ -1,13 +0,0 @@
# ---> Ansible
*.retry
filter/plugins/
library
# ---> Python
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# ---> Docs
/_docs

View File

@ -1,7 +0,0 @@
---
default: True
MD013: False
MD041: False
MD024: False
MD004:
style: dash

View File

@ -1 +0,0 @@
LICENSE

View File

@ -1,47 +0,0 @@
---
when:
- event: [pull_request]
- event: [push, manual]
branch:
- ${CI_REPO_DEFAULT_BRANCH}
steps:
- name: generate
image: quay.io/thegeeklab/ansible-doctor
environment:
ANSIBLE_DOCTOR_EXCLUDE_FILES: "['molecule/']"
ANSIBLE_DOCTOR_RENDERER__FORCE_OVERWRITE: "true"
ANSIBLE_DOCTOR_LOGGING__LEVEL: info
ANSIBLE_DOCTOR_ROLE__NAME: ${CI_REPO_NAME}
ANSIBLE_DOCTOR_TEMPLATE__NAME: readme
- name: format
image: quay.io/thegeeklab/alpine-tools
commands:
- prettier -w README.md
- name: diff
image: quay.io/thegeeklab/alpine-tools
commands:
- git diff --color=always README.md
- name: publish
image: quay.io/thegeeklab/wp-git-action
settings:
action:
- commit
- push
author_email: ci-bot@rknet.org
author_name: ci-bot
branch: main
message: "[skip ci] automated docs update"
netrc_machine: gitea.rknet.org
netrc_password:
from_secret: gitea_token
when:
- event: [push, manual]
branch:
- ${CI_REPO_DEFAULT_BRANCH}
depends_on:
- lint

View File

@ -1,30 +0,0 @@
---
when:
- event: [pull_request, tag]
- event: [push, manual]
branch:
- ${CI_REPO_DEFAULT_BRANCH}
steps:
- name: ansible-lint
image: quay.io/thegeeklab/ansible-dev-tools:1
commands:
- ansible-lint
environment:
FORCE_COLOR: "1"
- name: python-format
image: docker.io/python:3.12
commands:
- pip install -qq ruff
- ruff format --check --diff .
environment:
PY_COLORS: "1"
- name: python-lint
image: docker.io/python:3.12
commands:
- pip install -qq ruff
- ruff check .
environment:
PY_COLORS: "1"

View File

@ -1,26 +0,0 @@
---
when:
- event: [tag]
- event: [push, manual]
branch:
- ${CI_REPO_DEFAULT_BRANCH}
runs_on: [success, failure]
steps:
- name: matrix
image: quay.io/thegeeklab/wp-matrix
settings:
homeserver:
from_secret: matrix_homeserver
room_id:
from_secret: matrix_room_id
user_id:
from_secret: matrix_user_id
access_token:
from_secret: matrix_access_token
when:
- status: [failure]
depends_on:
- docs

View File

@ -1,20 +0,0 @@
---
extends: default
rules:
truthy:
allowed-values: ["True", "False"]
comments:
min-spaces-from-content: 1
comments-indentation: False
line-length: disable
braces:
min-spaces-inside: 0
max-spaces-inside: 1
brackets:
min-spaces-inside: 0
max-spaces-inside: 0
indentation: enable
octal-values:
forbid-implicit-octal: True
forbid-explicit-octal: True

21
LICENSE
View File

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2022 Robert Kaussow <mail@thegeeklab.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
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

133
README.md
View File

@ -1,133 +0,0 @@
# xoxys.ucs
[![Build Status](https://ci.rknet.org/api/badges/ansible/xoxys.ucs/status.svg)](https://ci.rknet.org/repos/ansible/xoxys.ucs)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?label=license)](https://gitea.rknet.org/ansible/xoxys.ucs/src/branch/main/LICENSE)
Configure an [Univention Corporate Server](https://www.univention.com/products/ucs/).
UCS is a server appliance with an integrated management system for the central and
cross-platform administration of servers, services, clients, desktops and users as well as
virtualized computers operated in UCS.
{{< hint type=important >}}
This role covers only some really basic configurations and should be considered as not production ready.
{{< /hint >}}
## Table of content
- [Requirements](#requirements)
- [Default Variables](#default-variables)
- [ucs_cronjobs](#ucs_cronjobs)
- [ucs_filesystem_acl](#ucs_filesystem_acl)
- [ucs_registry_extra](#ucs_registry_extra)
- [ucs_repository_unmaintained_enabled](#ucs_repository_unmaintained_enabled)
- [ucs_system_groups](#ucs_system_groups)
- [Dependencies](#dependencies)
- [License](#license)
- [Author](#author)
---
## Requirements
- Minimum Ansible version: `2.10`
## Default Variables
### ucs_cronjobs
#### Default value
```YAML
ucs_cronjobs: []
```
#### Example usage
```YAML
ucs_cronjobs:
- name: backup-cleanup
job: "find /var/univention-backup -mtime +7 -delete"
user: root
minute: 0
hour: 3
day: "*"
weekday: "*"
month: "*"
state: present
```
### ucs_filesystem_acl
#### Default value
```YAML
ucs_filesystem_acl: []
```
#### Example usage
```YAML
ucs_filesystem_acl:
- path: /shares/mydocuments # needs to be set
entity: john # needs to be set
etype: user # needs to be set
permissions: rw # needs to be set
state: # defaults to 'query'
recursive: # defaults to 'no'
```
### ucs_registry_extra
#### Default value
```YAML
ucs_registry_extra: []
```
#### Example usage
```YAML
ucs_registry_extra:
- path: timeserver
value: "ntp.example.com"
state: present
```
### ucs_repository_unmaintained_enabled
#### Default value
```YAML
ucs_repository_unmaintained_enabled: false
```
### ucs_system_groups
#### Default value
```YAML
ucs_system_groups: []
```
#### Example usage
```YAML
ucs_system_groups:
- name: fs-mydocuments-rw # needs to be set
description: # defaults to not set
subpath: # defaults to not set
ou: # defaults to not set
state: # defaults to 'present'
```
## Dependencies
None.
## License
MIT
## Author
[Robert Kaussow](https://gitea.rknet.org/xoxys)

View File

@ -1,41 +0,0 @@
---
ucs_filesystem_acl: []
# @var ucs_filesystem_acl:example: >
# ucs_filesystem_acl:
# - path: /shares/mydocuments # needs to be set
# entity: john # needs to be set
# etype: user # needs to be set
# permissions: rw # needs to be set
# state: # defaults to 'query'
# recursive: # defaults to 'no'
ucs_system_groups: []
# @var ucs_system_groups:example: >
# ucs_system_groups:
# - name: fs-mydocuments-rw # needs to be set
# description: # defaults to not set
# subpath: # defaults to not set
# ou: # defaults to not set
# state: # defaults to 'present'
ucs_repository_unmaintained_enabled: False
ucs_registry_extra: []
# @var ucs_registry_extra:example: >
# ucs_registry_extra:
# - path: timeserver
# value: "ntp.example.com"
# state: present
ucs_cronjobs: []
# @var ucs_cronjobs:example: >
# ucs_cronjobs:
# - name: backup-cleanup
# job: "find /var/univention-backup -mtime +7 -delete"
# user: root
# minute: 0
# hour: 3
# day: "*"
# weekday: "*"
# month: "*"
# state: present

View File

@ -1,24 +0,0 @@
---
- name: Restart apache service
ansible.builtin.service:
name: apache2
state: restarted
enabled: True
listen: __ucs_apache_restart
when: ucs_custom_tls_apache2_enabled
- name: Restart dovecot service
ansible.builtin.service:
name: dovecot
state: restarted
enabled: True
listen: __ucs_dovecot_restart
when: ucs_custom_tls_dovecot_enabled
- name: Restart postfix service
ansible.builtin.service:
name: postfix
state: restarted
enabled: True
listen: __ucs_postfix_restart
when: ucs_custom_tls_postfix_enabled

194
index.md Normal file
View File

@ -0,0 +1,194 @@
---
title: ucs
type: docs
---
[![Source Code](https://img.shields.io/badge/gitea-source%20code-blue?logo=gitea&logoColor=white)](https://gitea.rknet.org/ansible/xoxys.ucs) [![Build Status](https://img.shields.io/drone/build/ansible/xoxys.ucs?logo=drone&server=https%3A%2F%2Fdrone.rknet.org)](https://drone.rknet.org/ansible/xoxys.ucs) [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://gitea.rknet.org/ansible/xoxys.ucs/src/branch/main/LICENSE)
Configure an [Univention Corporate Server](https://www.univention.com/products/ucs/). UCS is a server appliance with an integrated management system for the central and cross-platform administration of servers, services, clients, desktops and users as well as virtualized computers operated in UCS.
{{< hint type=important >}} This role covers only some really basic configurations and should be considered as not production ready. {{< /hint >}}
<!--more-->
- [Default Variables](#default-variables)
- [ucs_cronjobs](#ucs_cronjobs)
- [ucs_custom_tls_apache2_enabled](#ucs_custom_tls_apache2_enabled)
- [ucs_custom_tls_dovecot_enabled](#ucs_custom_tls_dovecot_enabled)
- [ucs_custom_tls_enabled](#ucs_custom_tls_enabled)
- [ucs_custom_tls_postfix_enabled](#ucs_custom_tls_postfix_enabled)
- [ucs_filesystem_acl](#ucs_filesystem_acl)
- [ucs_registry_extra](#ucs_registry_extra)
- [ucs_repository_unmaintained_enabled](#ucs_repository_unmaintained_enabled)
- [ucs_system_groups](#ucs_system_groups)
- [ucs_tls_cert_path](#ucs_tls_cert_path)
- [ucs_tls_certs_dir](#ucs_tls_certs_dir)
- [ucs_tls_key_dir](#ucs_tls_key_dir)
- [ucs_tls_key_path](#ucs_tls_key_path)
- [Discovered Tags](#discovered-tags)
- [Dependencies](#dependencies)
---
## Default Variables
### ucs_cronjobs
#### Default value
```YAML
ucs_cronjobs: []
```
#### Example usage
```YAML
ucs_cronjobs:
- name: backup-cleanup
job: "find /var/univention-backup -mtime +7 -delete"
user: root
minute: 0
hour: 3
day: "*"
weekday: "*"
month: "*"
state: present
```
### ucs_custom_tls_apache2_enabled
#### Default value
```YAML
ucs_custom_tls_apache2_enabled: false
```
### ucs_custom_tls_dovecot_enabled
#### Default value
```YAML
ucs_custom_tls_dovecot_enabled: false
```
### ucs_custom_tls_enabled
#### Default value
```YAML
ucs_custom_tls_enabled: false
```
### ucs_custom_tls_postfix_enabled
#### Default value
```YAML
ucs_custom_tls_postfix_enabled: false
```
### ucs_filesystem_acl
#### Default value
```YAML
ucs_filesystem_acl: []
```
#### Example usage
```YAML
ucs_filesystem_acl:
- path: /shares/mydocuments # needs to be set
entity: john # needs to be set
etype: user # needs to be set
permissions: rw # needs to be set
state: # defaults to 'query'
recursive: # defaults to 'no'
```
### ucs_registry_extra
#### Default value
```YAML
ucs_registry_extra: []
```
#### Example usage
```YAML
ucs_registry_extra:
- path: timeserver
value: "ntp.example.com"
state: present
```
### ucs_repository_unmaintained_enabled
#### Default value
```YAML
ucs_repository_unmaintained_enabled: false
```
### ucs_system_groups
#### Default value
```YAML
ucs_system_groups: []
```
#### Example usage
```YAML
ucs_system_groups:
- name: fs-mydocuments-rw # needs to be set
description: # defaults to not set
subpath: # defaults to not set
ou: # defaults to not set
state: # defaults to 'present'
```
### ucs_tls_cert_path
#### Default value
```YAML
ucs_tls_cert_path: /etc/pki/tls/certs/mycert.pem
```
### ucs_tls_certs_dir
#### Default value
```YAML
ucs_tls_certs_dir: /etc/pki/tls/certs
```
### ucs_tls_key_dir
#### Default value
```YAML
ucs_tls_key_dir: /etc/pki/tls/private
```
### ucs_tls_key_path
#### Default value
```YAML
ucs_tls_key_path: /etc/pki/tls/private/mykey.pem
```
## Discovered Tags
tls_renewal
: &nbsp;
## Dependencies
None.

View File

@ -1,31 +0,0 @@
---
galaxy_info:
# @meta author:value: [Robert Kaussow](https://gitea.rknet.org/xoxys)
author: Robert Kaussow <mail@thegeeklab.de>
namespace: xoxys
role_name: ucs
# @meta description: >
# [![Build Status](https://ci.rknet.org/api/badges/ansible/xoxys.ucs/status.svg)](https://ci.rknet.org/repos/ansible/xoxys.ucs)
# [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?label=license)](https://gitea.rknet.org/ansible/xoxys.ucs/src/branch/main/LICENSE)
#
# Configure an [Univention Corporate Server](https://www.univention.com/products/ucs/).
# UCS is a server appliance with an integrated management system for the central and
# cross-platform administration of servers, services, clients, desktops and users as well as
# virtualized computers operated in UCS.
#
# {{< hint type=important >}}
# This role covers only some really basic configurations and should be considered as not production ready.
# {{< /hint >}}
# @end
description: Configure an Univention Corporate Server
license: MIT
min_ansible_version: "2.10"
platforms:
- name: EL
versions:
- "9"
galaxy_tags:
- univention
- ucs
- domain
dependencies: []

View File

@ -1,17 +0,0 @@
[tool.ruff]
exclude = [".git", "__pycache__"]
line-length = 99
indent-width = 4
[tool.ruff.lint]
ignore = ["W191", "E111", "E114", "E117", "S101", "S105"]
select = ["F", "E", "I", "W", "S"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "lf"
[tool.pytest.ini_options]
filterwarnings = ["ignore::FutureWarning", "ignore::DeprecationWarning"]

View File

@ -1,7 +0,0 @@
---
collections:
- name: https://gitea.rknet.org/ansible/xoxys.general
type: git
- name: ansible.posix
roles: []

View File

@ -1,47 +0,0 @@
---
- name: Set system settings to registry
xoxys.general.ucr:
path: "{{ item.path }}"
value: "{{ item.value }}"
state: "{{ item.state | default('present') }}"
loop: "{{ __usc_registry_settings + ucs_registry_extra }}"
- name: Create system groups
community.general.udm_group:
name: "{{ item.name }}"
description: "{{ item.description | default(omit) }}"
subpath: "{{ item.subpath | default(omit) }}"
ou: "{{ item.ou | default(omit) }}"
state: "{{ item.state | default('present') }}"
loop: "{{ ucs_system_groups }}"
loop_control:
label: "{{ item.name }}"
- name: Set acl for shares
ansible.posix.acl:
path: "{{ item.path }}"
entity: "{{ item.entity }}"
etype: "{{ item.etype }}"
permissions: "{{ item.permissions }}"
state: "{{ item.state | default('query') }}"
recursive: "{{ item.recursive | default('no') }}"
default: "{{ item.default | default('no') }}"
loop: "{{ ucs_filesystem_acl }}"
loop_control:
label: "{{ item.path }}"
- name: Setup custom cronjobs
ansible.builtin.cron:
name: "{{ item.name }}"
minute: "{{ item.minute | default(0) }}"
hour: "{{ item.hour | default(3) }}"
day: "{{ item.day | default('*') }}"
weekday: "{{ item.weekday | default('*') }}"
month: "{{ item.month | default('*') }}"
user: "{{ item.user | default('root') }}"
cron_file: univention-custom
job: "{{ item.job }}"
state: "{{ item.state | default('present') }}"
loop: "{{ ucs_cronjobs }}"
loop_control:
label: "{{ item.name }}"

View File

@ -1,4 +0,0 @@
---
__usc_registry_settings:
- path: "repository/online/unmaintained"
value: "{{ 'yes' if ucs_repository_unmaintained_enabled else 'no' }}"