Hi, see my answers inline. > On 16 Oct 2015, at 12:35, WANG, Ming Hao (Tony T) > <tony.a.w...@alcatel-lucent.com> wrote: > > We have developed some Ansible playbooks for operation automation, and we are > investigating if we can change the automation engine from Ansible to Mistral > since Mistral has powerful workflow control. > Could you please help to provide how to let Mistral call Ansible playbook or > Ansible module?
I would recommend to write a custom action (not ad-hoc actions in DSL, they are pretty limited). You can just write a python class and make it available in Mistral workflow. It is pretty easy to do and described at [1]. In Python you’ll have more control on how to call ansible properly. If you have any specific questions on that you can join our IRC channel #openstack-mistral and talk to us there. > My understanding is to use ssh std_action to let Mistral access Ansible > server to call Ansible playbook/modules since Mistral ad-hoc action must base > on an existing system action. Yes, you can use std.ssh action but I guess it won’t be too convenient because you’ll have to deal with shell commands directly. Yes, ad-hoc actions can help you do it in a more elegant manner but they are pretty limited and allow to create only wrappers. With Python custom actions (it can be a class hierarchy, for example) you can do much more. For instance, you can expose individual ansible actions and transform their params in a form that better fits workflow DSL. Anyway, it’s just my preference. You may like this second option better. > Another question is: > If we install Mistral and Ansible on a same server, is it possible to > simplify it? Yes, like I described above. [1] http://docs.openstack.org/developer/mistral/developer/creating_custom_action.html <http://docs.openstack.org/developer/mistral/developer/creating_custom_action.html> Renat Akhmerov @ Mirantis Inc.
__________________________________________________________________________ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev