Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.package
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Łukasz Nowak
slapos.package
Commits
8a5753b6
Commit
8a5753b6
authored
Feb 08, 2018
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playbook: auto online hotplugged CPU/Memory on ubuntu and debian>7
parent
953b4b58
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
playbook/roles/vm-bootstrap/tasks/main.yml
playbook/roles/vm-bootstrap/tasks/main.yml
+4
-4
No files found.
playbook/roles/vm-bootstrap/tasks/main.yml
View file @
8a5753b6
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment