From eb8b8b678ec69b6fb1a2d4647087eab0841c5e25 Mon Sep 17 00:00:00 2001 From: Ricard Illa Date: Tue, 24 Jan 2023 17:53:30 +0100 Subject: [PATCH] role for eudev --- roles/eudev/tasks/alpine.yml | 52 ++++++++++++++++++++++++++++++++++++ roles/eudev/tasks/main.yml | 5 ++++ 2 files changed, 57 insertions(+) create mode 100644 roles/eudev/tasks/alpine.yml create mode 100644 roles/eudev/tasks/main.yml diff --git a/roles/eudev/tasks/alpine.yml b/roles/eudev/tasks/alpine.yml new file mode 100644 index 0000000..a306bdb --- /dev/null +++ b/roles/eudev/tasks/alpine.yml @@ -0,0 +1,52 @@ +--- + +- name: disable mdev + service: + name: "{{ item }}" + runlevel: sysinit + state: stopped + enabled: false + loop: + - hwdrivers + - mdev + +- name: disable mdevd + service: + name: "{{ item }}" + runlevel: sysinit + state: stopped + enabled: false + loop: + - mdevd + - mdevd-init + - hwdrivers + +- name: keep mdevd-openrc uninstalled + apk: + name: mdevd-openrc + state: absent + +- name: install eudev + apk: + name: + - eudev + - udev-init-scripts + - udev-init-scripts-openrc + +- name: enable udev + service: + name: "{{ item }}" + runlevel: sysinit + state: started + enabled: true + loop: + - udev + - udev-trigger + - udev-settle + +- name: enable udev-postmount + service: + name: udev-postmount + runlevel: default + state: started + enabled: true diff --git a/roles/eudev/tasks/main.yml b/roles/eudev/tasks/main.yml new file mode 100644 index 0000000..e852163 --- /dev/null +++ b/roles/eudev/tasks/main.yml @@ -0,0 +1,5 @@ +--- + +- name: 'setup eudev for alpine' + include_tasks: alpine.yml + when: ansible_distribution == "Alpine"