Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.playbook
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
slapos.playbook
Commits
af4853c1
Commit
af4853c1
authored
Apr 30, 2015
by
Rafael Monnerat
👻
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update
parent
ee94429a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
1 deletion
+48
-1
playbook/imt-vm-bootstrap.yml
playbook/imt-vm-bootstrap.yml
+4
-0
playbook/roles/vm-bootstrap/tasks/main.yml
playbook/roles/vm-bootstrap/tasks/main.yml
+1
-1
playbook/roles/vm-disks/files/autofdisk
playbook/roles/vm-disks/files/autofdisk
+11
-0
playbook/roles/vm-disks/tasks/main.yml
playbook/roles/vm-disks/tasks/main.yml
+32
-0
No files found.
playbook/imt-vm-bootstrap.yml
View file @
af4853c1
...
...
@@ -4,3 +4,7 @@
roles
:
-
vm-bootstrap
-
{
role
:
vm-disks
,
vd_disk
:
b
,
data_n
:
1
}
-
{
role
:
vm-disks
,
vd_disk
:
c
,
data_n
:
2
}
-
{
role
:
vm-disks
,
vd_disk
:
d
,
data_n
:
3
}
playbook/roles/vm-bootstrap/tasks/main.yml
View file @
af4853c1
playbook/roles/vm-disks/files/autofdisk
0 → 100644
View file @
af4853c1
#!/bin/bash
DISK
=
$1
echo
"n
p
1
w
"
|fdisk
$DISK
playbook/roles/vm-disks/tasks/main.yml
0 → 100644
View file @
af4853c1
---
-
name
:
stat /dev/vd{{ vd_disk }}
stat
:
path=/dev/vd{{ vd_disk }}
register
:
disk
-
name
:
stat partition /dev/vd{{ vd_disk }}1
stat
:
path=/dev/vd{{ vd_disk }}1
register
:
partition_vd
-
name
:
create partition script
copy
:
src=autofdisk dest=/usr/local/playbook-autofdisk mode=700
when
:
disk.stat.exists == True and partition_vd.stat.exists == False
-
name
:
Create Partition
shell
:
/usr/local/playbook-autofdisk /dev/vd{{ vd_disk }}
when
:
disk.stat.exists == True and partition_vd.stat.exists == False
-
name
:
Create Partition
filesystem
:
fstype=ext4 dev=/dev/vd{{ vd_disk }}1
when
:
disk.stat.exists == True and partition_vd.stat.exists == False
-
name
:
stat partition /dev/vd{{ vd_disk }}1
stat
:
path=/dev/vd{{ vd_disk }}1
register
:
partition_vd_created
-
name
:
Create directory /data{{ data_n }}
file
:
path=/data{{ data_n }} state=directory
when
:
partition_vd_created.stat.exists == True
-
name
:
Mount /data{{ data_n }}
mount
:
name=/data{{ data_n }} src=/dev/vd{{ vd_disk }}1 fstype=ext4 state=mounted
when
:
partition_vd_created.stat.exists == True
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