Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
ansible
/
common-playbook
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 960cba45
authored
Feb 11, 2018
by
ansible
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
1 parent
2a78d320
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
119 deletions
roles/partition/tasks/apimanager.yml
roles/partition/tasks/apimanager.yml
View file @
960cba4
---
-
name
:
Create Partiton "{{ app_disk }}"
-
hosts
:
02_vdc-disk
become
:
true
tasks
:
-
name
:
Create partiton
parted
:
parted
:
device
:
"
{{
item.device
}}"
device
:
"
{{
item.device
}}"
number
:
"
{{
item.number
}}"
number
:
"
{{
item.number
}}"
...
@@ -11,129 +7,29 @@
...
@@ -11,129 +7,29 @@
state
:
present
state
:
present
# part_type: logical
# part_type: logical
with_items
:
with_items
:
-
{
device
:
"
/dev/vdc
"
,
number
:
"
1"
,
start
:
"
0%"
,
end
:
"
40%"
}
-
{
device
:
"
{{
app_disk
}}
"
,
number
:
"
1"
,
start
:
"
0%"
,
end
:
"
40%"
}
-
{
device
:
"
/dev/vdc
"
,
number
:
"
2"
,
start
:
"
41%"
,
end
:
"
80%"
}
-
{
device
:
"
{{
app_disk
}}
"
,
number
:
"
2"
,
start
:
"
41%"
,
end
:
"
80%"
}
-
{
device
:
"
/dev/vdc
"
,
number
:
"
3"
,
start
:
"
81%"
,
end
:
"
90%"
}
-
{
device
:
"
{{
app_disk
}}
"
,
number
:
"
3"
,
start
:
"
81%"
,
end
:
"
90%"
}
-
{
device
:
"
/dev/vdc
"
,
number
:
"
4"
,
start
:
"
91%"
,
end
:
"
100%"
}
-
{
device
:
"
{{
app_disk
}}
"
,
number
:
"
4"
,
start
:
"
91%"
,
end
:
"
100%"
}
-
hosts
:
02_sdb-disk
-
name
:
"
Format
disk:
\"
{{
item.device
}}
\"
using
etx4"
become
:
true
tasks
:
-
name
:
Create partiton
parted
:
device
:
"
{{
item.device
}}"
number
:
"
{{
item.number
}}"
part_end
:
"
{{
item.end
}}"
part_start
:
"
{{
item.start
}}"
state
:
present
# part_type: logical
with_items
:
-
{
device
:
"
/dev/sdb"
,
number
:
"
1"
,
start
:
"
0%"
,
end
:
"
40%"
}
-
{
device
:
"
/dev/sdb"
,
number
:
"
2"
,
start
:
"
41%"
,
end
:
"
80%"
}
-
{
device
:
"
/dev/sdb"
,
number
:
"
3"
,
start
:
"
81%"
,
end
:
"
90%"
}
-
{
device
:
"
/dev/sdb"
,
number
:
"
4"
,
start
:
"
91%"
,
end
:
"
100%"
}
-
hosts
:
02_vdb-disk
become
:
true
tasks
:
-
name
:
Create partiton
parted
:
device
:
"
{{
item.device
}}"
number
:
"
{{
item.number
}}"
part_end
:
"
{{
item.end
}}"
part_start
:
"
{{
item.start
}}"
state
:
present
# part_type: logical
with_items
:
-
{
device
:
"
/dev/vdb"
,
number
:
"
1"
,
start
:
"
0%"
,
end
:
"
40%"
}
-
{
device
:
"
/dev/vdb"
,
number
:
"
2"
,
start
:
"
41%"
,
end
:
"
80%"
}
-
{
device
:
"
/dev/vdb"
,
number
:
"
3"
,
start
:
"
81%"
,
end
:
"
90%"
}
-
{
device
:
"
/dev/vdb"
,
number
:
"
4"
,
start
:
"
91%"
,
end
:
"
100%"
}
---
-
hosts
:
02_vdc-disk
become
:
true
tasks
:
-
name
:
"
Format
disk:
\"
{{
item.device
}}
\"
using
etx4"
filesystem
:
dev
:
"
{{
item.device
}}"
fstype
:
ext4
with_items
:
-
{
device
:
/dev/vdc1
}
-
{
device
:
/dev/vdc2
}
-
{
device
:
/dev/vdc3
}
-
{
device
:
/dev/vdc4
}
-
hosts
:
02_sdb-disk
become
:
true
tasks
:
-
name
:
"
Format
disk:
\"
{{
item.device
}}
\"
using
etx4"
filesystem
:
dev
:
"
{{
item.device
}}"
fstype
:
ext4
with_items
:
-
{
device
:
/dev/sdb1
}
-
{
device
:
/dev/sdb2
}
-
{
device
:
/dev/sdb3
}
-
{
device
:
/dev/sdb4
}
-
hosts
:
02_vdb-disk
become
:
true
tasks
:
-
name
:
"
Format
disk:
\"
{{
item.device
}}
\"
using
etx4"
filesystem
:
filesystem
:
dev
:
"
{{
item.device
}}"
dev
:
"
{{
item.device
}}"
fstype
:
ext4
fstype
:
ext4
with_items
:
with_items
:
-
{
device
:
/dev/vdb1
}
-
{
device
:
"
{{
app_disk
}}"
1
}
-
{
device
:
/dev/vdb2
}
-
{
device
:
"
{{
app_disk
}}"
2
}
-
{
device
:
/dev/vdb3
}
-
{
device
:
"
{{
app_disk
}}"
3
}
-
{
device
:
/dev/vdb4
}
-
{
device
:
"
{{
app_disk
}}"
4
}
---
-
hosts
:
02_vdc-disk
become
:
true
tasks
:
-
name
:
"
Mount
up
\"
{{
item.device
}}
\"
to
\"
{{
item.path
}}
\"
"
mount
:
state
:
mounted
fstype
:
ext4
src
:
"
{{
item.device
}}"
path
:
"
{{
item.path
}}"
with_items
:
-
{
device
:
/dev/vdc1
,
path
:
/opt
}
-
{
device
:
/dev/vdc2
,
path
:
/upload
}
-
{
device
:
/dev/vdc3
,
path
:
/archive
}
-
{
device
:
/dev/vdc4
,
path
:
/data
}
-
hosts
:
02_sdb-disk
become
:
true
tasks
:
-
name
:
"
Mount
up
\"
{{
item.device
}}
\"
to
\"
{{
item.path
}}
\"
"
mount
:
state
:
mounted
fstype
:
ext4
src
:
"
{{
item.device
}}"
path
:
"
{{
item.path
}}"
with_items
:
-
{
device
:
/dev/sdb1
,
path
:
/opt
}
-
{
device
:
/dev/sdb2
,
path
:
/upload
}
-
{
device
:
/dev/sdb3
,
path
:
/archive
}
-
{
device
:
/dev/sdb4
,
path
:
/data
}
-
hosts
:
02_vdb-disk
-
name
:
"
Mount
up
\"
{{
item.device
}}
\"
to
\"
{{
item.path
}}
\"
"
become
:
true
tasks
:
-
name
:
"
Mount
up
\"
{{
item.device
}}
\"
to
\"
{{
item.path
}}
\"
"
mount
:
mount
:
state
:
mounted
state
:
mounted
fstype
:
ext4
fstype
:
ext4
src
:
"
{{
item.device
}}"
src
:
"
{{
item.device
}}"
path
:
"
{{
item.path
}}"
path
:
"
{{
item.path
}}"
with_items
:
with_items
:
-
{
device
:
/dev/vdb1
,
path
:
/opt
}
-
{
device
:
"
{{
app_disk
}}"
1
,
path
:
/opt
}
-
{
device
:
/dev/vdb2
,
path
:
/upload
}
-
{
device
:
"
{{
app_disk
}}"
2
,
path
:
/upload
}
-
{
device
:
/dev/vdb3
,
path
:
/archive
}
-
{
device
:
"
{{
app_disk
}}"
3
,
path
:
/archive
}
-
{
device
:
/dev/vdb4
,
path
:
/data
}
-
{
device
:
"
{{
app_disk
}}"
4
,
path
:
/data
}
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
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 post a comment