os_ironic: fix broken import (#26802)

This commit is contained in:
Pilou 2017-07-15 15:44:50 +02:00 committed by Monty Taylor
parent 613690bd46
commit d9265c7498
2 changed files with 7 additions and 2 deletions

View file

@ -156,7 +156,11 @@ try:
except ImportError:
HAS_SHADE = False
import jsonpatch
try:
import jsonpatch
HAS_JSONPATCH = True
except ImportError:
HAS_JSONPATCH = False
def _parse_properties(module):
@ -231,6 +235,8 @@ def main():
if not HAS_SHADE:
module.fail_json(msg='shade is required for this module')
if not HAS_JSONPATCH:
module.fail_json(msg='jsonpatch is required for this module')
if (module.params['auth_type'] in [None, 'None'] and
module.params['ironic_url'] is None):
module.fail_json(msg="Authentication appears to be disabled, "

View file

@ -47,7 +47,6 @@ lib/ansible/modules/cloud/google/gcdns_record.py
lib/ansible/modules/cloud/google/gcdns_zone.py
lib/ansible/modules/cloud/misc/serverless.py
lib/ansible/modules/cloud/openstack/os_client_config.py
lib/ansible/modules/cloud/openstack/os_ironic.py
lib/ansible/modules/cloud/ovirt/ovirt_disks.py
lib/ansible/modules/cloud/univention/udm_user.py
lib/ansible/modules/cloud/vmware/vca_nat.py