summaryrefslogtreecommitdiffstats
path: root/snaps/openstack
diff options
context:
space:
mode:
Diffstat (limited to 'snaps/openstack')
-rw-r--r--snaps/openstack/create_instance.py3
-rw-r--r--snaps/openstack/utils/launch_utils.py12
2 files changed, 4 insertions, 11 deletions
diff --git a/snaps/openstack/create_instance.py b/snaps/openstack/create_instance.py
index 16bd0ce..e2a6991 100644
--- a/snaps/openstack/create_instance.py
+++ b/snaps/openstack/create_instance.py
@@ -474,9 +474,8 @@ class OpenStackVmInstance(OpenStackComputeObject):
playbook
:param fip_name: the name of the floating IP to use for applying the
playbook (default - will take the first)
- :return: the return value from ansible
"""
- return ansible_utils.apply_playbook(
+ ansible_utils.apply_playbook(
pb_file_loc, [self.get_floating_ip(fip_name=fip_name).ip],
self.get_image_user(),
ssh_priv_key_file_path=self.keypair_settings.private_filepath,
diff --git a/snaps/openstack/utils/launch_utils.py b/snaps/openstack/utils/launch_utils.py
index 00ea822..bb7600c 100644
--- a/snaps/openstack/utils/launch_utils.py
+++ b/snaps/openstack/utils/launch_utils.py
@@ -464,17 +464,13 @@ def __apply_ansible_playbook(ansible_config, os_creds_dict, vm_dict,
ansible_config.get('variables'), os_creds_dict, vm_dict,
image_dict, flavor_dict, networks_dict, routers_dict)
- retval = ansible_utils.apply_playbook(
+ ansible_utils.apply_playbook(
ansible_config['playbook_location'], floating_ips, remote_user,
ssh_priv_key_file_path=private_key_filepath,
variables=variables,
proxy_setting=proxy_settings)
- if retval != 0:
- # Not a fatal type of event
- raise Exception(
- 'Error applying playbook found at location - %s',
- ansible_config.get('playbook_location'))
- elif ansible_config.get('post_processing'):
+
+ if 'post_processing' in ansible_config:
post_proc_config = ansible_config['post_processing']
if 'sleep' in post_proc_config:
time.sleep(post_proc_config['sleep'])
@@ -484,8 +480,6 @@ def __apply_ansible_playbook(ansible_config, os_creds_dict, vm_dict,
logger.info('Rebooting VM - %s', vm_name)
vm_dict[vm_name].reboot(RebootType.hard)
- return retval
-
def __get_connection_info(ansible_config, vm_dict):
"""