Commit 8a5753b6 authored by Alain Takoudjou's avatar Alain Takoudjou

playbook: auto online hotplugged CPU/Memory on ubuntu and debian>7

parent 953b4b58
......@@ -46,11 +46,11 @@
- include: ssh.yml
- name: Enable hotplugged CPU and Memory automatically
lineinfile: dest=/lib/udev/rules.d/80-hotplug-cpu-mem.rules state=present create=yes line="{{ item }}"
lineinfile: dest=/etc/udev/rules.d/99-hotplug-cpu-mem.rules state=present create=yes line="{{ item }}"
with_items:
- 'SUBSYSTEM=="cpu", ACTION=="add", TEST=="online", ATTR{online}=="0", ATTR{online}="1"'
- 'SUBSYSTEM=="memory", ACTION=="add", TEST=="state", ATTR{state}=="offline", ATTR{state}="online"'
when: ansible_distribution == "Ubuntu" or ansible_distribution == "Debian"
- "SUBSYSTEM==\"cpu\",ACTION==\"add\",RUN+=\"/bin/sh -c '[ ! -e /sys$devpath/online ] || echo 1 > /sys$devpath/online'\""
- "SUBSYSTEM==\"memory\",ACTION==\"add\",RUN+=\"/bin/sh -c '[ ! -e /sys$devpath/online ] || echo online > /sys$devpath/state'\""
when: ansible_distribution == "Ubuntu" or (ansible_distribution == "Debian" and ansible_distribution_major_version|int > 7)
- file: path=/opt/upgrader state=directory
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment