From Hot Agouti, 2 Weeks ago, written in YAML.
  1. ---
  2. - hosts: all
  3.   tasks:
  4.     - name: Display all parameters known for the Foreman host
  5.       debug:
  6.         var: foreman_params
  7.   roles:
  8. <%- if @host.all_ansible_roles.present? -%>
  9. <%=   @host.all_ansible_roles.map { |role| "    - #{role.name.strip}" }.join("\n") %>
  10. <%- end -%>
  11.   environment:
  12. <% host_enc['parameters'].each do |param| -%>
  13.   <%- if param[0].start_with?('env.') -%>
  14.     - <%= param[0][4..-1] %>: <%= param[1] %>
  15.   <%- end -%>
  16. <% end -%>
  17.  
captcha