Skip to content

Commit

Permalink
Merge pull request #380 from fdupont-redhat/v2v_allow_playbooks_on_po…
Browse files Browse the repository at this point in the history
…wered_off_vm

Allow running playbook against powered off VM
  • Loading branch information
gmcculloug authored Jul 30, 2018
2 parents 2c5fa67 + bf019e1 commit c38ef4b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def main
service_template = task.send("#{transformation_hook}_ansible_playbook_service_template")
return if service_template.nil?
target_host = target_host(task, transformation_hook)
return if target_host.nil? || target_host.power_state != 'on'
return if target_host.blank?
service_dialog_options = { :hosts => target_host.ipaddresses.first }
service_request = @handle.execute(:create_service_provision_request, service_template, service_dialog_options)
task.set_option("#{transformation_hook}_ansible_playbook_service_request_id".to_sym, service_request.id)
Expand Down

0 comments on commit c38ef4b

Please sign in to comment.