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
Arnaud Véron
slapos.package
Commits
8e7d5a06
Commit
8e7d5a06
authored
Sep 14, 2016
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm-bootstrap playbook: skip vm-disks role if vm disk is not present
parent
92d78bf2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
20 deletions
+38
-20
playbook/imt-vm-bootstrap.yml
playbook/imt-vm-bootstrap.yml
+25
-20
playbook/roles/vm-bootstrap/files/mounted_disk
playbook/roles/vm-bootstrap/files/mounted_disk
+13
-0
No files found.
playbook/imt-vm-bootstrap.yml
View file @
8e7d5a06
...
@@ -14,29 +14,34 @@
...
@@ -14,29 +14,34 @@
-
create
-
create
-
dateext
-
dateext
pre_tasks
:
-
name
:
Get mounted disk list
script
:
roles/vm-bootstrap/files/mounted_disk
register
:
vd_list
roles
:
roles
:
-
{
role
:
vm-bootstrap
,
startup_playbook_id
:
imt-vm-bootstrap.yml
}
-
{
role
:
vm-bootstrap
,
startup_playbook_id
:
imt-vm-bootstrap.yml
}
-
ntp
-
ntp
-
{
role
:
vm-disks
,
vd_disk
:
b
,
data_n
:
1
}
-
{
role
:
vm-disks
,
vd_disk
:
b
,
data_n
:
1
,
when
:
vd_list.stdout.find("vdb") != -1
}
-
{
role
:
vm-disks
,
vd_disk
:
c
,
data_n
:
2
}
-
{
role
:
vm-disks
,
vd_disk
:
c
,
data_n
:
2
,
when
:
vd_list.stdout.find("vdc") != -1
}
-
{
role
:
vm-disks
,
vd_disk
:
d
,
data_n
:
3
}
-
{
role
:
vm-disks
,
vd_disk
:
d
,
data_n
:
3
,
when
:
vd_list.stdout.find("vdd") != -1
}
-
{
role
:
vm-disks
,
vd_disk
:
e
,
data_n
:
4
}
-
{
role
:
vm-disks
,
vd_disk
:
e
,
data_n
:
4
,
when
:
vd_list.stdout.find("vde") != -1
}
-
{
role
:
vm-disks
,
vd_disk
:
f
,
data_n
:
5
}
-
{
role
:
vm-disks
,
vd_disk
:
f
,
data_n
:
5
,
when
:
vd_list.stdout.find("vdf") != -1
}
-
{
role
:
vm-disks
,
vd_disk
:
g
,
data_n
:
6
}
-
{
role
:
vm-disks
,
vd_disk
:
g
,
data_n
:
6
,
when
:
vd_list.stdout.find("vdg") != -1
}
-
{
role
:
vm-disks
,
vd_disk
:
h
,
data_n
:
7
}
-
{
role
:
vm-disks
,
vd_disk
:
h
,
data_n
:
7
,
when
:
vd_list.stdout.find("vdh") != -1
}
-
{
role
:
vm-disks
,
vd_disk
:
i
,
data_n
:
8
}
-
{
role
:
vm-disks
,
vd_disk
:
i
,
data_n
:
8
,
when
:
vd_list.stdout.find("vdi") != -1
}
-
{
role
:
vm-disks
,
vd_disk
:
j
,
data_n
:
9
}
-
{
role
:
vm-disks
,
vd_disk
:
j
,
data_n
:
9
,
when
:
vd_list.stdout.find("vdj") != -1
}
-
{
role
:
vm-disks
,
vd_disk
:
k
,
data_n
:
10
}
-
{
role
:
vm-disks
,
vd_disk
:
k
,
data_n
:
10
,
when
:
vd_list.stdout.find("vdk") != -1
}
-
{
role
:
vm-disks
,
vd_disk
:
l
,
data_n
:
11
}
-
{
role
:
vm-disks
,
vd_disk
:
l
,
data_n
:
11
,
when
:
vd_list.stdout.find("vdl") != -1
}
-
{
role
:
vm-disks
,
vd_disk
:
m
,
data_n
:
12
}
-
{
role
:
vm-disks
,
vd_disk
:
m
,
data_n
:
12
,
when
:
vd_list.stdout.find("vdm") != -1
}
-
{
role
:
vm-disks
,
vd_disk
:
n
,
data_n
:
12
}
-
{
role
:
vm-disks
,
vd_disk
:
n
,
data_n
:
12
,
when
:
vd_list.stdout.find("vdn") != -1
}
-
{
role
:
vm-disks
,
vd_disk
:
o
,
data_n
:
12
}
-
{
role
:
vm-disks
,
vd_disk
:
o
,
data_n
:
12
,
when
:
vd_list.stdout.find("vdo") != -1
}
-
{
role
:
vm-disks
,
vd_disk
:
p
,
data_n
:
12
}
-
{
role
:
vm-disks
,
vd_disk
:
p
,
data_n
:
12
,
when
:
vd_list.stdout.find("vdp") != -1
}
-
{
role
:
vm-disks
,
vd_disk
:
q
,
data_n
:
12
}
-
{
role
:
vm-disks
,
vd_disk
:
q
,
data_n
:
12
,
when
:
vd_list.stdout.find("vdq") != -1
}
-
{
role
:
vm-disks
,
vd_disk
:
r
,
data_n
:
12
}
-
{
role
:
vm-disks
,
vd_disk
:
r
,
data_n
:
12
,
when
:
vd_list.stdout.find("vdr") != -1
}
-
{
role
:
vm-disks
,
vd_disk
:
s
,
data_n
:
12
}
-
{
role
:
vm-disks
,
vd_disk
:
s
,
data_n
:
12
,
when
:
vd_list.stdout.find("vds") != -1
}
-
{
role
:
vm-disks
,
vd_disk
:
t
,
data_n
:
12
}
-
{
role
:
vm-disks
,
vd_disk
:
t
,
data_n
:
12
,
when
:
vd_list.stdout.find("vdt") != -1
}
-
{
role
:
vm-disks
,
vd_disk
:
u
,
data_n
:
12
}
-
{
role
:
vm-disks
,
vd_disk
:
u
,
data_n
:
12
,
when
:
vd_list.stdout.find("vdu") != -1
}
-
role
:
logrotate
-
role
:
logrotate
logrotate_scripts
:
"
{{logrotate_args}}"
logrotate_scripts
:
"
{{logrotate_args}}"
playbook/roles/vm-bootstrap/files/mounted_disk
0 → 100755
View file @
8e7d5a06
#!/bin/sh
RESULT
=
""
for
i
in
a b c d e f g h i j k l m n o p q r s t u
do
if
[
-e
"/dev/vd
$i
"
]
then
R
=
$(
ls
/dev/vd
$i
|
cut
-d
'/'
-f3
)
RESULT
=
"
$RESULT
$R
"
fi
done
echo
$RESULT
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