diff --git a/roles/config-hot-plug/tasks/main.yaml b/roles/config-hot-plug/tasks/main.yaml index 16c7070..e9853ba 100644 --- a/roles/config-hot-plug/tasks/main.yaml +++ b/roles/config-hot-plug/tasks/main.yaml @@ -10,22 +10,26 @@ # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # 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: + template: + src: udev.j2 path: "{{ path_hot_plug_udev }}" - line: "{{ line_hot_plug_udev }}" - create: yes + owner: root + group: root + mode: '0644' # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # configure /etc/default/grub.d/hotplug.cfg - name: configure /etc/default/grub.d/hotplug.cfg file - lineinfile: + template: + src: grub.j2 path: "{{ path_hot_plug_grub }}" - line: "{{ line_hot_plug_grub }}" - create: yes + owner: root + group: root + mode: '0644' # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - name: Execute the command update-grub in remote shell ansible.builtin.shell: update-grub -# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \ No newline at end of file +# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ diff --git a/roles/config-hot-plug/templates/grub.j2 b/roles/config-hot-plug/templates/grub.j2 new file mode 100644 index 0000000..897c720 --- /dev/null +++ b/roles/config-hot-plug/templates/grub.j2 @@ -0,0 +1 @@ +{{ line_hot_plug_grub }} diff --git a/roles/config-hot-plug/templates/udev.j2 b/roles/config-hot-plug/templates/udev.j2 new file mode 100644 index 0000000..71cd77d --- /dev/null +++ b/roles/config-hot-plug/templates/udev.j2 @@ -0,0 +1 @@ +{{ line_hot_plug_udev }}