From 6cdcc644c2b326346110d65ba559c9f8b6fa4f58 Mon Sep 17 00:00:00 2001 From: rubenb Date: Tue, 9 Jan 2024 18:58:56 +0100 Subject: [PATCH] hot plug role --- roles/config-hot-plug/tasks/main.yaml | 19 +++++++++++++++++++ roles/config-hot-plug/vars/main.yaml | 5 +++++ 2 files changed, 24 insertions(+) create mode 100644 roles/config-hot-plug/tasks/main.yaml create mode 100644 roles/config-hot-plug/vars/main.yaml diff --git a/roles/config-hot-plug/tasks/main.yaml b/roles/config-hot-plug/tasks/main.yaml new file mode 100644 index 0000000..f44f3ac --- /dev/null +++ b/roles/config-hot-plug/tasks/main.yaml @@ -0,0 +1,19 @@ +# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +# Install and configure HOT-PLUG +# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +# configure /usr/lib/udev/rules.d/80-hotplug-cpu-mem.rules +- name: configure /usr/lib/udev/rules.d/80-hotplug-cpu-mem.rules file + lineinfile: + path: "{{ path_hot_plug_udev }}" + line: "{{ line_hot_plug_udev }}" +# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +# configure /etc/default/grub.d/hotplug.cfg +- name: configure /etc/default/grub.d/hotplug.cfg file + lineinfile: + path: "{{ path_hot_plug_grub }}" + line: "{{ line_hot_plug_grub }}" +# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \ No newline at end of file diff --git a/roles/config-hot-plug/vars/main.yaml b/roles/config-hot-plug/vars/main.yaml new file mode 100644 index 0000000..6d764e4 --- /dev/null +++ b/roles/config-hot-plug/vars/main.yaml @@ -0,0 +1,5 @@ +# vars file +path_hot_plug_udev: /usr/lib/udev/rules.d/80-hotplug-cpu-mem.rules +line_hot_plug_udev: "SUBSYSTEM==”cpu”, ACTION==”add”, TEST==”online”, ATTR{online}==”0”, ATTR{online}=”1”" +path_hot_plug_grub: /etc/default/grub.d/hotplug.cfg +line_hot_plug_grub: "GRUB_CMDLINE_LINUX_DEFAULT="quiet memhp_default_state=online"" \ No newline at end of file