Can one assign elements to attributes?


#1

Hello,

Are there any examples of assigning a task/request option to an attritube? A specific use case I have in mind is for / ConfigurationManagement / AnsibleTower / Operations / JobTemplate. User completes a service catalog which generates an element values e.g. dialog_app_name? Is it possible to assign this to the attribute in the schema? EG Attribute Name: job_template_name ; Value : ${/#miq_provision.get_option(:app_name)}

Thanks


#2

Maybe not the best title, but essentially it is possible to assign an option to an atrribute, see attached.


#3

I added my Tower job into the VM provision state machine without modifying the JobTemplate class:

ansible_in_state_machine

The .missing instance of JobTemplate assigns the root_password value to job_template_name attribute via the substitution value ${#_missing_instance} :

jobtemplate_missing


#4

Thanks @xian @mkanoor also has handy examples here