Data Infrastructure Management Software Discussions

Highlighted

Call Ansible from WFA

I'd like to have my WFA workflow make an ansible call to execute a command on a linux server. I haven't been able to find anything on integrating ansible into a WFA workflow step, could someone point me in the right direction or let me know if this is even possible?

5 REPLIES 5

Re: Call Ansible from WFA

Does your org have ansible Tower?

 

If not, it may be easier to develop the integration in the other way. Have Ansible call WFA to execute the WFA workflow.

Re: Call Ansible from WFA

I'll have to find out if we have Ansible Tower. We're trying to have an end to end solution within our WFA workflow. One of our workflow steps would be to execute a command on a Linux server. Trying to find the simplest or most effective way of going about this. 

Re: Call Ansible from WFA

Hi,

 

Considering your statement "One of our workflow steps would be to execute a command on a Linux server. Trying to find the simplest or most effective way of going about this"...

 

It is possible to call a WFA workfow from a WFA workflow. Assuming you are running WFA on windows, have you considered deploying a WFA instance on Linux? You could then create a WFA workflow on your Linux WFA instanace that could run your linux commands locally and call that workflow from your Windows WFA instance via the REST API.

 

Hope that gives you some ideas.

 

/Matt

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

Re: Call Ansible from WFA

This reply may be too late, but here's a NetApp blog post about how to call WFA from Ansible:

    https://netapp.io/2018/07/11/switching-to-ansible-from-wfa/

 

It should be possible to write a custom command block in PowerShell that would use the 'InvokeNcSsh' cmdlet to execute an Ansible play-book.  I haven't tried that yet, as I'm just starting to learn about Ansible.  Just be aware that there are a number of issues executing that cmdlet, as it requires PuTTY to be installed on the WFA server.  There are a number of threads in this Community regarding the 'InvokeNcSsh' cmdlet and PuTTy.

Re: Call Ansible from WFA

Yes, it is possible to call Ansible from WFA.  I was able to create a generic WFA workflow that would execute a command via SSH against a Linux server (or any other device that supports SSH) using 'Invoke-NaSsh', not 'InvokeNcSsh' as I had mentioned earlier .  And then I was able to execute an Ansible playbook saved on a Linux server.

Forums