Provisioning Workflows

Hi there,

I’m trying to enhance my workflow by adding in pre-provisioning tasks to check for things like hostnames already exist in Active Directory etc.

I’ve added my tasks in the pre-provisioning phases, yet the tasks seem to only run after the provisioning of the VM. (Which the defeats the purpose of the task).

How do I set the order of which tasks in the different phases of a provisioning workflow?

Thank you.

This could be handled in the configuration phase. That phase is synchronous with between user order and beginning the clone operations of the system. There are a few posts in here around hostname or IP address with configuration phase that you may find useful for starting points.

Hi @cbunge

Thank you for a speedy response.

I have tried adding in the task in all phases of the workflow - but it appears to clone the machine first and then run the task which is what i to prevent depending on the outcome of the task, i.e. something exists already.

Thank you.

See specifically this:

Only the “Configuration” phase runs before clone.

Hi Chris,

I have added in the task in the Configuration phase like so

And then when i’ve triggered the workflow via the catalog it has gone straight to the Provisioning stage.

I am unable to see where it has attempted to run the configuration task when i review the history.

When you state “triggered the workflow vai the catalog”, are you stating you’ve kicked off a new VM build? Configuration phase would only execute on a new build just prior to the clone of the system. If you manually run a workflow against a system post, there is no config phase.

Hi Chris,

Sorry if I wasn’t clear.

So I requested a fresh new VM via the catalog which is linked to that workflow where i’ve added in that precheck task in the configuration phase as per the screenshots above.

After i submitted my request via catalog i went to review the history and i can see it has gone straight to the provisioning and not triggered the configuration task.

What version are you on of Morpheus? Does it work if you select the workflow using standard instances? What about different scripting language besides Ansible? Curious if the command bus of Ansible can’t do anything since there is no agent at that stage.

Hi Chris,

V.6.0.2

We have tried powershell also. It’s more of the fact it’s not launching the configuration phase task at all. As it doesn’t execute ansible locally it launches an ansible job inside ansible tower.

Have you tried expanding the “Provision” group on the History tab? I notice your screen shot only shows it collapsed. I’m fairly sure I’ve done something similar to what you are trying to do and it worked just fine… The Task would show up before “Deploy Virtual Machine” in the list of things it is doing inside the “Provision” item you are showing collapsed…

Hi @mussont

I have indeed, and still doesn’t show any output for the configuration task.
And i can’t see the output in Ansible Tower side as no job has been launched sadly.