Embedded Ansible and variables


#1

Hello,

When using pure Embedded Ansible, I’m trying to find a way to pass value from a dialog’s field as an ansible extra vars like you would do with the cli ansible-playbook myplaybook -e foo=bar. I found it’s quite easy with Tower but not on pure embedded.

Thanks


#2

The dialog fields can be substituted in the Automate Methods input parameters. All the dialog fields that came along with the service would be in the root object so you should be able to do

my_extra_var1 => ${/#dialog_field1}

where my_extra_var1 would be defined in the Input Parameter for the method and dialog_field1 would be the field1 coming in from dialogs.


#3

Using input parameters with Ansible playbook methods is described here: https://manageiq.gitbook.io/mastering-cloudforms-automation-addendum/embedded_ansible/chapter-6#input-parameters (a WIP so possibly subject to change).

pemcg