-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
systemd_oomd_service_name: systemd-oomd | ||
systemd_oomd_configuration_file: /etc/systemd/timesyncd.conf | ||
systemd_oomd_swapusedlimit: | ||
Check failure on line 4 in roles/systemd_oomd/defaults/main.yml GitHub Actions / ansible-lintyaml[empty-values]
Check failure on line 4 in roles/systemd_oomd/defaults/main.yml GitHub Actions / yamllint
Check failure on line 4 in roles/systemd_oomd/defaults/main.yml GitHub Actions / yamllint
|
||
systemd_oomd_defaultmemorypressurelimit: | ||
Check failure on line 5 in roles/systemd_oomd/defaults/main.yml GitHub Actions / ansible-lintyaml[empty-values]
Check failure on line 5 in roles/systemd_oomd/defaults/main.yml GitHub Actions / yamllint
Check failure on line 5 in roles/systemd_oomd/defaults/main.yml GitHub Actions / yamllint
|
||
systemd_oomd_defaultmemorypressuredurationsec: | ||
Check failure on line 6 in roles/systemd_oomd/defaults/main.yml GitHub Actions / ansible-lintyaml[empty-values]
Check failure on line 6 in roles/systemd_oomd/defaults/main.yml GitHub Actions / yamllint
Check failure on line 6 in roles/systemd_oomd/defaults/main.yml GitHub Actions / yamllint
|
||
systemd_timesyncd_package_name: systemd-oomd | ||
Check failure on line 7 in roles/systemd_oomd/defaults/main.yml GitHub Actions / ansible-lintvar-naming[no-role-prefix]
|
||
systemd_timesyncd_package_version: "" | ||
Check failure on line 8 in roles/systemd_oomd/defaults/main.yml GitHub Actions / ansible-lintvar-naming[no-role-prefix]
|
||
systemd_timesyncd_package_state: present | ||
Check failure on line 9 in roles/systemd_oomd/defaults/main.yml GitHub Actions / ansible-lintvar-naming[no-role-prefix]
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
argument_specs: | ||
main: | ||
options: | ||
systemd_oomd_service_name: | ||
required: true | ||
type: str | ||
systemd_oomd_configuration_file: | ||
required: true | ||
type: str | ||
systemd_oomd_swapusedlimit: | ||
type: str | ||
systemd_oomd_defaultmemorypressurelimit: | ||
type: str | ||
systemd_oomd_defaultmemorypressuredurationsec: | ||
type: str | ||
systemd_oomd_package_name: | ||
required: true | ||
type: str | ||
systemd_oomd_package_version: | ||
type: str | ||
systemd_oomd_package_state: | ||
type: str | ||
choices: | ||
- present | ||
- absent |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
galaxy_info: | ||
author: Roman Kuzmitskii <[email protected]> | ||
description: systemd oomd role | ||
license: GPLv2 | ||
min_ansible_version: 2.16.0 | ||
platforms: | ||
- name: Debian | ||
versions: | ||
- buster | ||
- bullseye | ||
- name: Ubuntu | ||
versions: | ||
- focal | ||
dependencies: [] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
- name: Ensure systemd oomd | ||
tags: | ||
- systemd_oomd | ||
- systemd | ||
- oomd | ||
block: | ||
- name: Ensure systemd oomd package | ||
ansible.builtin.import_tasks: package.yml | ||
- name: Ensure systemd oomd oomd.conf | ||
ansible.builtin.import_tasks: oomd.conf.yml | ||
- name: Ensure systemd oomd systemd service | ||
ansible.builtin.import_tasks: systemd_service.yml |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
- name: Ensure oomd.conf | ||
ansible.builtin.template: | ||
src: oomd.conf.j2 | ||
dest: "{{ systemd_oomd_configuration_file }}" | ||
group: root | ||
owner: root | ||
mode: "0644" | ||
register: systemd_oomd_conf | ||
become: true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
- name: Ensure systemd oomd package | ||
ansible.builtin.include_role: | ||
name: damex.apt.apt_packages | ||
vars: | ||
apt_packages: # noqa: var-naming[no-role-prefix] | ||
- name: "{{ systemd_oomd_package_name }}" | ||
version: "{{ systemd_oomd_package_version }}" | ||
state: "{{ systemd_oomd_package_state }}" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
- name: Ensure systemd service {{ systemd_oomd_service_name }} | ||
ansible.builtin.include_role: | ||
name: damex.systemd.systemd_service | ||
vars: | ||
systemd_service_name: "{{ systemd_oomd_service_name }}" | ||
systemd_service_restart_on: "{{ systemd_oomd_conf.changed }}" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{{ ansible_managed | comment }} | ||
[OOM] | ||
SwapUsedLimit = {{ systemd_oomd_swapusedlimit }} | ||
DefaultMemoryPressureLimit = {{ systemd_oomd_defaultmemorypressurelimit }} | ||
DefaultMemoryPressureDurationSec = {{ systemd_oomd_defaultmemorypressuredurationsec }} |