Skip to content
This repository has been archived by the owner on May 17, 2023. It is now read-only.

elmarx/ansible-to-icinga2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

to_icinga2

a simple filter to convert ansible vars (more precisely dictionaries) to icinga2 host-attributes expression.

i.e. if you define the following var e.g. in your host_vars/* files

icinga_host_attributes:
  http_vhosts:
    Syncthing https redirect:
      http_port: 8384
      http_expect: 302
    Syncthing:
      http_port: 8384
      http_ssl: 1
      http_expect: 401

you can use {{ hostvars[item].icinga_host_attributes|to_icinga2 }} in your icinga2-templates, yielding

vars.http_vhosts["Syncthing https redirect"] = {
    http_port = 8384
    http_expect = 302
}
vars.http_vhosts["Syncthing"] = {
    http_port = 8384
    http_expect = 401
    http_ssl = 1
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages