Where find all available variables?

Hi, :slight_smile:

I’m customizing the “Foreman Ansible Job Templates” and i would like to know where i can find more details about what are the available variables that i can use in my “erb templates”.

For exemple, i know that “@host.all_ansible_roles” exist, but where can i find all “@host.*” available ?

Thx for help

I found it !! :slight_smile:

With the following template code, i’m able to ordering my ansible role exection

---
- hosts: all
  roles:
<%- if @host.inherited_ansible_roles.present? -%>
<%=   @host.inherited_ansible_roles.map { |test| "    - #{test.name.strip}" }.join("\n") %>
<%- end -%>
<%- if @host.all_ansible_roles.present? -%>
<%=   @host.all_ansible_roles.map { |role| "    - #{role.name.strip}" }.join("\n") %>
<%- end -%>

I don’t know why, but ansible doesn’t execute twice the same role, so all my roles are played in the good way only once :slight_smile: This is exactly what i was looking for :stuck_out_tongue:

Have a nice day

I found my answer in “Template Jobs > “select your job” > edit > help”. Then i found “Host::Managed” and all relatedvariables :slight_smile: