|
|
@ -383,9 +383,7 @@ EXAMPLES = """
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
import lxc
|
|
|
|
import lxc
|
|
|
|
except ImportError:
|
|
|
|
except ImportError:
|
|
|
|
msg = 'The lxc module is not importable. Check the requirements.'
|
|
|
|
HAS_LXC = False
|
|
|
|
print("failed=True msg='%s'" % msg)
|
|
|
|
|
|
|
|
raise SystemExit(msg)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# LXC_COMPRESSION_MAP is a map of available compression types when creating
|
|
|
|
# LXC_COMPRESSION_MAP is a map of available compression types when creating
|
|
|
@ -1706,6 +1704,11 @@ def main():
|
|
|
|
supports_check_mode=False,
|
|
|
|
supports_check_mode=False,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if not HAS_LXC:
|
|
|
|
|
|
|
|
module.fail_json(
|
|
|
|
|
|
|
|
msg='The `lxc` module is not importable. Check the requirements.'
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
lv_name = module.params.get('lv_name')
|
|
|
|
lv_name = module.params.get('lv_name')
|
|
|
|
if not lv_name:
|
|
|
|
if not lv_name:
|
|
|
|
module.params['lv_name'] = module.params.get('name')
|
|
|
|
module.params['lv_name'] = module.params.get('name')
|
|
|
|