Playbooks to a new Lilik
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

37 lines
962 B

object Host "{{ item.key }}" {
import "generic-host"
address = "{{ item.value.address }}"
vars.os = "Linux"
vars.sla = "24x7"
{% if ('agent_type' in item.value) and (item.value.agent_type == 'ssh') %}
vars.agent_type = "ssh"
{% endif %}
{% if 'vhosts' in item.value %}
{% for vhost in item.value.vhosts %}
vars.http_vhosts["https cert: {{ vhost }}"] = {
http_ssl = true
http_vhost = "{{ vhost }}"
http_onredirect = "sticky"
http_sni = true
/* Check remaining days before cert expiration */
http_certificate = "30,20"
}
{% for uri, content in (item.value.vhosts_uri[vhost]|d({'/': ''})).items() %}
vars.http_vhosts["https service: {{ vhost }}{{ uri }}"] = {
http_ssl = true
http_vhost = "{{ vhost }}"
http_onredirect = "sticky"
http_sni = true
http_uri = "{{ uri }}"
{% if content != '' %}http_string = "{{ content|replace('"','\\"') }}"{% endif %}
}
{% endfor %}
{% endfor %}
{% endif %}
}