Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
1e1f1178
Commit
1e1f1178
authored
Jul 31, 2013
by
Brian Coca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
whitespace updates on new lines
Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
parent
d8e8aa71
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
library/system/lvg
+8
-8
No files found.
library/system/lvg
View file @
1e1f1178
...
@@ -160,7 +160,7 @@ def main():
...
@@ -160,7 +160,7 @@ def main():
changed
=
True
changed
=
True
else
:
else
:
### create PV
### create PV
pvcreate_cmd
=
module
.
get_bin_path
(
'pvcreate'
,
True
)
pvcreate_cmd
=
module
.
get_bin_path
(
'pvcreate'
,
True
)
for
current_dev
in
dev_list
:
for
current_dev
in
dev_list
:
rc
,
_
,
err
=
module
.
run_command
(
"
%
s
%
s"
%
(
pvcreate_cmd
,
current_dev
))
rc
,
_
,
err
=
module
.
run_command
(
"
%
s
%
s"
%
(
pvcreate_cmd
,
current_dev
))
if
rc
==
0
:
if
rc
==
0
:
...
@@ -180,8 +180,8 @@ def main():
...
@@ -180,8 +180,8 @@ def main():
else
:
else
:
if
this_vg
[
'lv_count'
]
==
0
or
force
:
if
this_vg
[
'lv_count'
]
==
0
or
force
:
### remove VG
### remove VG
vgremove_cmd
=
module
.
get_bin_path
(
'vgremove'
,
True
)
vgremove_cmd
=
module
.
get_bin_path
(
'vgremove'
,
True
)
rc
,
_
,
err
=
module
.
run_command
(
"
%
s --force
%
s"
%
(
vgremove_cmd
,
vg
))
rc
,
_
,
err
=
module
.
run_command
(
"
%
s --force
%
s"
%
(
vgremove_cmd
,
vg
))
if
rc
==
0
:
if
rc
==
0
:
module
.
exit_json
(
changed
=
True
)
module
.
exit_json
(
changed
=
True
)
else
:
else
:
...
@@ -201,15 +201,15 @@ def main():
...
@@ -201,15 +201,15 @@ def main():
if
devs_to_add
:
if
devs_to_add
:
devs_to_add_string
=
' '
.
join
(
devs_to_add
)
devs_to_add_string
=
' '
.
join
(
devs_to_add
)
### create PV
### create PV
pvcreate_cmd
=
module
.
get_bin_path
(
'pvcreate'
,
True
)
pvcreate_cmd
=
module
.
get_bin_path
(
'pvcreate'
,
True
)
for
current_dev
in
devs_to_add
:
for
current_dev
in
devs_to_add
:
rc
,
_
,
err
=
module
.
run_command
(
"
%
s
%
s"
%
(
pvcreate_cmd
,
current_dev
))
rc
,
_
,
err
=
module
.
run_command
(
"
%
s
%
s"
%
(
pvcreate_cmd
,
current_dev
))
if
rc
==
0
:
if
rc
==
0
:
changed
=
True
changed
=
True
else
:
else
:
module
.
fail_json
(
msg
=
"Creating physical volume '
%
s' failed"
%
current_dev
,
rc
=
rc
,
err
=
err
)
module
.
fail_json
(
msg
=
"Creating physical volume '
%
s' failed"
%
current_dev
,
rc
=
rc
,
err
=
err
)
### add PV to our VG
### add PV to our VG
vgextend_cmd
=
module
.
get_bin_path
(
'vgextend'
,
True
)
vgextend_cmd
=
module
.
get_bin_path
(
'vgextend'
,
True
)
rc
,
_
,
err
=
module
.
run_command
(
"vgextend
%
s
%
s"
%
(
vgextend_cmd
,
vg
,
devs_to_add_string
))
rc
,
_
,
err
=
module
.
run_command
(
"vgextend
%
s
%
s"
%
(
vgextend_cmd
,
vg
,
devs_to_add_string
))
if
rc
==
0
:
if
rc
==
0
:
changed
=
True
changed
=
True
...
@@ -219,8 +219,8 @@ def main():
...
@@ -219,8 +219,8 @@ def main():
### remove some PV from our VG
### remove some PV from our VG
if
devs_to_remove
:
if
devs_to_remove
:
devs_to_remove_string
=
' '
.
join
(
devs_to_remove
)
devs_to_remove_string
=
' '
.
join
(
devs_to_remove
)
vgreduce_cmd
=
module
.
get_bin_path
(
'vgreduce'
,
True
)
vgreduce_cmd
=
module
.
get_bin_path
(
'vgreduce'
,
True
)
rc
,
_
,
err
=
module
.
run_command
(
"
%
s --force
%
s
%
s"
%
(
vgreduce_cmd
,
vg
,
devs_to_remove_string
))
rc
,
_
,
err
=
module
.
run_command
(
"
%
s --force
%
s
%
s"
%
(
vgreduce_cmd
,
vg
,
devs_to_remove_string
))
if
rc
==
0
:
if
rc
==
0
:
changed
=
True
changed
=
True
else
:
else
:
...
...
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