In Ansible task type, can morpheus variables be used in Command Options (execute target is set to Local) ? eg: <%=accountName%> ?
okie, that is not available in MorpheusAccess
but for a valid var it would evaluate
host_list declined parsing /var/opt/morpheus/morpheus-ui/dynamic_inv/ST01/morpheusinv.yml
There is also a huge “morpheus” extravar that is handed in to Ansible by default. You might run an Ansible playbook e.g.:
- hosts: all
gather_facts: false
tasks:
- debug: var=morpheus
This will dump out the morpheus var to the console so you can see what’s in it. it’ll be unformatted, and for some reason the | to_nice_json and | to_nice_yaml filters don’t seem to work on it, even when the msg: argument is used for debug, but they DO work if you use the template module to dump the morpheus var to /tmp or something.
You can also add values to the ‘morpheus’ extravar in various ways, but you should look first to see if what you need is already there.