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 ?
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 This is exactly what i was looking for