add system/swap role

This commit is contained in:
Aine 2023-03-18 13:24:46 +02:00
parent 081cc5e025
commit 33f1875ee9
No known key found for this signature in database
GPG key ID: 34969C908CCA2804
5 changed files with 54 additions and 0 deletions

31
docs/services/system.md Normal file
View file

@ -0,0 +1,31 @@
# System-related configuration
This Ansible playbook can install and configure various system-related things for you.
All the sections below relates to the host OS instead of docker containers.
### swap
To enable [swap](https://en.wikipedia.org/wiki/Memory_paging) management, add the following configuration to your `vars.yml` file and re-run the [installation](../installing.md) process:
```yaml
########################################################################
# #
# system #
# #
########################################################################
system_swap_enabled: true
########################################################################
# #
# /system #
# #
########################################################################
```
By default, swap file size calculated using the following formula: `total RAM * 2 if total RAM <= 2GB, else - 1GB`,
if you want to set different swap file size, you can set the `system_swap_size` var in megabytes, example (4gb):
```yaml
system_swap_size: 4096
```

View file

@ -18,6 +18,7 @@
| [Vaultwarden](https://github.com/dani-garcia/vaultwarden) | A lightweight unofficial and compatible implementation of the [Bitwarden](https://bitwarden.com/) password manager | [Link](services/vaultwarden.md) |
| [Uptime-kuma](https://uptime.kuma.pet/) | A fancy self-hosted monitoring tool | [Link](services/uptime-kuma.md) |
| [Woodpecker CI](https://woodpecker-ci.org/) | A simple Continuous Integration (CI) engine with great extensibility. | [Link](services/woodpecker-ci.md) |
| System-related | A collection of various system-related components | [Link](services/system.md) |
## Related playbooks

View file

@ -1,5 +1,22 @@
---
########################################################################
# #
# system/swap #
# #
########################################################################
system_swap_enabled: false
########################################################################
# #
# system/swap #
# #
########################################################################
########################################################################
# #
# com.devture.ansible.role.systemd_service_manager #

View file

@ -3,6 +3,9 @@
- src: geerlingguy.docker
version: 6.1.0
- src: git+https://gitlab.com/etke.cc/roles/swap
version: 33ce32b065276a96b7e2562752f3a63913ed5480
- src: git+https://github.com/devture/com.devture.ansible.role.docker_sdk_for_python.git
version: 129c8590e106b83e6f4c259649a613c6279e937a

View file

@ -37,6 +37,8 @@
- role: mash/playbook_base
- role: galaxy/swap
# This role exposes various tags (setup-postgres, setup-all, upgrade-postgres, import-postgres, etc.), so we don't tag it here.
- role: galaxy/com.devture.ansible.role.postgres