summaryrefslogtreecommitdiffstats
path: root/ansible_collections/t_systems_mms
diff options
context:
space:
mode:
Diffstat (limited to 'ansible_collections/t_systems_mms')
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/.gitattributes6
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/.gitignore6
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/CHANGELOG.md435
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/CHANGELOG.rst229
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/CODE_OF_CONDUCT.md3
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/CONTRIBUTING.md54
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/FILES.json1244
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/LICENSE674
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/MANIFEST.json34
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/README.md195
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/changelogs/.plugin-cache.yaml220
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/changelogs/changelog.yaml256
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/changelogs/config.yaml33
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/.gitkeep0
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_command.rst277
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_command_info.rst155
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_command_template.rst257
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_command_template_info.rst151
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_deploy.rst127
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_deploy_info.rst147
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_director_inventory.rst203
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_endpoint.rst178
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_endpoint_info.rst151
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_host.rst339
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_host_info.rst151
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_host_template.rst335
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_host_template_info.rst151
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_hostgroup.rst165
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_hostgroup_info.rst151
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_notification.rst236
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_notification_info.rst151
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_notification_template.rst213
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_notification_template_info.rst151
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_scheduled_downtime.rst226
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_service.rst278
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_service_apply.rst308
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_service_apply_info.rst151
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_service_info.rst151
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_service_template.rst295
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_service_template_info.rst151
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_servicegroup.rst165
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_servicegroup_info.rst151
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_serviceset.rst164
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_timeperiod.rst176
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_timeperiod_info.rst151
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_timeperiod_template.rst202
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_timeperiod_template_info.rst151
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_user.rst193
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_user_group.rst163
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_user_group_info.rst151
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_user_info.rst151
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_user_template.rst173
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_user_template_info.rst151
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_zone.rst166
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/docs/icinga_zone_info.rst155
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_command.yml89
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_command_info.yml7
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_command_template.yml70
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_command_template_info.yml7
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_deploy.yml6
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_deploy_info.yml6
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_endpoint.yml21
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_endpoint_info.yml7
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_host.yml48
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_host_info.yml7
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_host_template.yml46
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_host_template_info.yml7
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_hostgroup.yml18
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_hostgroup_info.yml7
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_notification.yml37
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_notification_info.yml7
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_notification_template.yml32
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_notification_template_info.yml7
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_scheduled_downtime.yml46
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_service.yml38
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_service_apply.yml66
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_service_apply_info.yml7
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_service_info.yml7
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_service_template.yml39
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_service_template_info.yml7
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_servicegroup.yml18
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_servicegroup_info.yml7
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_serviceset.yml19
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_timeperiod.yml27
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_timeperiod_info.yml7
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_timeperiod_template.yml29
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_timeperiod_template_info.yml7
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_user.yml24
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_user_group.yml18
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_user_group_info.yml7
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_user_info.yml7
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_user_template.yml20
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_user_template_info.yml7
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_zone.yml17
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/examples/icinga_zone_info.yml7
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/meta/runtime.yml45
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/doc_fragments/common_options.py30
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/inventory/icinga_director_inventory.py195
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/module_utils/icinga.py360
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_command.py290
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_command_info.py133
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_command_template.py269
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_command_template_info.py122
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_deploy.py119
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_deploy_info.py140
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_endpoint.py168
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_endpoint_info.py112
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_host.py445
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_host_info.py112
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_host_template.py429
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_host_template_info.py114
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_hostgroup.py154
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_hostgroup_info.py112
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_notification.py274
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_notification_info.py114
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_notification_template.py227
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_notification_template_info.py114
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_scheduled_downtime.py269
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_service.py409
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_service_apply.py365
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_service_apply_info.py115
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_service_info.py112
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_service_template.py327
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_service_template_info.py114
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_servicegroup.py154
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_servicegroup_info.py114
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_serviceset.py151
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_timeperiod.py168
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_timeperiod_info.py114
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_timeperiod_template.py229
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_timeperiod_template_info.py114
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_user.py191
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_user_group.py153
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_user_group_info.py112
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_user_info.py112
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_user_template.py165
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_user_template_info.py114
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_zone.py151
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_zone_info.py127
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/renovate.json14
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/README.md263
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/defaults/main.yml58
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/handlers/main.yml8
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/meta/main.yml10
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_command.yml32
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_command_template.yml33
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_endpoint.yml28
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_host.yml56
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_host_template.yml55
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_hostgroup.yml26
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_notification.yml34
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_notification_template.yml35
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_scheduled_downtime.yml30
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_service.yml45
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_service_apply.yml45
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_service_template.yml45
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_servicegroup.yml26
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_serviceset.yml26
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_timeperiod.yml27
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_user.yml30
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_user_template.yml28
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_zone.yml26
-rw-r--r--ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/main.yml90
163 files changed, 20989 insertions, 0 deletions
diff --git a/ansible_collections/t_systems_mms/icinga_director/.gitattributes b/ansible_collections/t_systems_mms/icinga_director/.gitattributes
new file mode 100644
index 000000000..616f010c2
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/.gitattributes
@@ -0,0 +1,6 @@
+*.sh text eol=lf
+*.py text eol=lf
+*.md text eol=lf
+*.yml text eol=lf
+*.yaml text eol=lf
+*.txt text eol=lf
diff --git a/ansible_collections/t_systems_mms/icinga_director/.gitignore b/ansible_collections/t_systems_mms/icinga_director/.gitignore
new file mode 100644
index 000000000..1aa4f07da
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/.gitignore
@@ -0,0 +1,6 @@
+*.tar.gz
+test/results
+tests/output
+.tox
+*.pyc
+__pycache__/
diff --git a/ansible_collections/t_systems_mms/icinga_director/CHANGELOG.md b/ansible_collections/t_systems_mms/icinga_director/CHANGELOG.md
new file mode 100644
index 000000000..67425cd98
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/CHANGELOG.md
@@ -0,0 +1,435 @@
+# Changelog
+
+## [1.18.0](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/tree/1.18.0) (2021-06-14)
+
+[Full Changelog](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/compare/1.17.0...1.18.0)
+
+**Merged pull requests:**
+
+- add period to notification task [\#121](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/121) ([michaelamattes](https://github.com/michaelamattes))
+- add info about documentation [\#120](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/120) ([rndmh3ro](https://github.com/rndmh3ro))
+
+## [1.17.0](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/tree/1.17.0) (2021-05-09)
+
+[Full Changelog](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/compare/1.16.0...1.17.0)
+
+**Merged pull requests:**
+
+- add timeperiod\_template and corresponding info module [\#118](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/118) ([rndmh3ro](https://github.com/rndmh3ro))
+- add ansible-2.11 to CI [\#117](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/117) ([rndmh3ro](https://github.com/rndmh3ro))
+- Improve Release Action [\#116](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/116) ([schurzi](https://github.com/schurzi))
+
+## [1.16.0](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/tree/1.16.0) (2021-03-05)
+
+[Full Changelog](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/compare/1.15.0...1.16.0)
+
+**Implemented enhancements:**
+
+- add Usergroups modules [\#114](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/114) ([rndmh3ro](https://github.com/rndmh3ro))
+
+**Closed issues:**
+
+- Add support to specify user Groups in icinga Notifications [\#111](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/issues/111)
+- icinga\_notification | time period [\#109](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/issues/109)
+
+**Merged pull requests:**
+
+- Update installation instructions in README.md [\#115](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/115) ([rndmh3ro](https://github.com/rndmh3ro))
+- update notification modules - add option user\_groups [\#112](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/112) ([sgruber94](https://github.com/sgruber94))
+
+## [1.15.0](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/tree/1.15.0) (2021-02-12)
+
+[Full Changelog](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/compare/1.14.0...1.15.0)
+
+**Implemented enhancements:**
+
+- Add support to change the check\_source / command\_endpoint parameter [\#107](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/issues/107)
+- add new options to notification and notification template [\#110](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/110) ([rndmh3ro](https://github.com/rndmh3ro))
+- Add support to change the check\_source / command\_endpoint parameter [\#108](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/108) ([xFuture603](https://github.com/xFuture603))
+
+**Fixed bugs:**
+
+- fix naming for timeperiod test task [\#102](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/102) ([BenjaminBoehm](https://github.com/BenjaminBoehm))
+
+**Closed issues:**
+
+- Support Event Commands [\#100](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/issues/100)
+
+**Merged pull requests:**
+
+- add more test executions to trigger all paths [\#106](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/106) ([rndmh3ro](https://github.com/rndmh3ro))
+
+## [1.14.0](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/tree/1.14.0) (2021-02-02)
+
+[Full Changelog](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/compare/1.13.0...1.14.0)
+
+**Implemented enhancements:**
+
+- Add event commands to modules that support this feature [\#101](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/101) ([xFuture603](https://github.com/xFuture603))
+
+**Merged pull requests:**
+
+- make it possible to run the script from the root dir and hacking dir [\#105](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/105) ([rndmh3ro](https://github.com/rndmh3ro))
+- Fix zone [\#104](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/104) ([rndmh3ro](https://github.com/rndmh3ro))
+
+## [1.13.0](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/tree/1.13.0) (2021-02-01)
+
+[Full Changelog](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/compare/1.12.0...1.13.0)
+
+**Implemented enhancements:**
+
+- add info modules for Director objects [\#98](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/98) ([schurzi](https://github.com/schurzi))
+
+**Closed issues:**
+
+- Append properties [\#96](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/issues/96)
+- Provide modules to get information from Icinga Director [\#89](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/issues/89)
+- Parameters for check execution at Service Apply level are ignored [\#65](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/issues/65)
+
+**Merged pull requests:**
+
+- update readme with new stuff [\#103](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/103) ([rndmh3ro](https://github.com/rndmh3ro))
+- use version for github action, short sha is no longer supported [\#99](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/99) ([schurzi](https://github.com/schurzi))
+- remove unneeded return values for host [\#97](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/97) ([schurzi](https://github.com/schurzi))
+
+## [1.12.0](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/tree/1.12.0) (2021-01-14)
+
+[Full Changelog](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/compare/1.11.0...1.12.0)
+
+**Implemented enhancements:**
+
+- Add check\_interval parameter to host\_template [\#95](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/95) ([mmslkr](https://github.com/mmslkr))
+- spelling fixes, add notes-section, remove useless sections [\#94](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/94) ([rndmh3ro](https://github.com/rndmh3ro))
+- Add execution params [\#67](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/67) ([AnBenn](https://github.com/AnBenn))
+
+## [1.11.0](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/tree/1.11.0) (2021-01-12)
+
+[Full Changelog](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/compare/1.10.1...1.11.0)
+
+**Fixed bugs:**
+
+- add back url parameter [\#92](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/92) ([rndmh3ro](https://github.com/rndmh3ro))
+
+**Merged pull requests:**
+
+- remove period from short description [\#93](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/93) ([rndmh3ro](https://github.com/rndmh3ro))
+- remove unneeded return values [\#88](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/88) ([schurzi](https://github.com/schurzi))
+
+## [1.10.1](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/tree/1.10.1) (2021-01-11)
+
+[Full Changelog](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/compare/1.10.0...1.10.1)
+
+**Implemented enhancements:**
+
+- Update tests [\#86](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/86) ([rndmh3ro](https://github.com/rndmh3ro))
+
+## [1.10.0](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/tree/1.10.0) (2021-01-11)
+
+[Full Changelog](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/compare/1.9.1...1.10.0)
+
+**Implemented enhancements:**
+
+- change class to make compatible for python2 [\#84](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/84) ([rndmh3ro](https://github.com/rndmh3ro))
+- add version\_added to modules and module options [\#82](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/82) ([rndmh3ro](https://github.com/rndmh3ro))
+- add docstrings to the functions of the icinga class [\#81](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/81) ([rndmh3ro](https://github.com/rndmh3ro))
+- add name alias for object\_name [\#80](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/80) ([rndmh3ro](https://github.com/rndmh3ro))
+
+**Fixed bugs:**
+
+- Fix url spec [\#85](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/85) ([rndmh3ro](https://github.com/rndmh3ro))
+- fix spelling in module docs [\#83](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/83) ([rndmh3ro](https://github.com/rndmh3ro))
+
+## [1.9.1](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/tree/1.9.1) (2021-01-06)
+
+[Full Changelog](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/compare/1.9.0...1.9.1)
+
+**Implemented enhancements:**
+
+- use doc\_fragments for modules documentation [\#78](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/78) ([rndmh3ro](https://github.com/rndmh3ro))
+- added wished files and directories to build\_ignore list [\#77](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/77) ([xFuture603](https://github.com/xFuture603))
+
+**Closed issues:**
+
+- Update module docs with FQCN [\#61](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/issues/61)
+- Add meta directory with runtime.yml to collection [\#60](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/issues/60)
+- Remove unwanted files from release-tarball [\#58](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/issues/58)
+
+**Merged pull requests:**
+
+- fix copyright notice in all files [\#79](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/79) ([rndmh3ro](https://github.com/rndmh3ro))
+- use fqcn in all examples, fix example and test generation [\#76](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/76) ([rndmh3ro](https://github.com/rndmh3ro))
+- Create CONTRIBUTING.md [\#74](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/74) ([rndmh3ro](https://github.com/rndmh3ro))
+- Create runtime.yml [\#72](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/72) ([rndmh3ro](https://github.com/rndmh3ro))
+- Create LICENSE [\#71](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/71) ([rndmh3ro](https://github.com/rndmh3ro))
+- run tests on a schedule [\#70](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/70) ([rndmh3ro](https://github.com/rndmh3ro))
+
+## [1.9.0](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/tree/1.9.0) (2020-12-14)
+
+[Full Changelog](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/compare/1.8.1...1.9.0)
+
+**Implemented enhancements:**
+
+- add vars option to icinga\_notification [\#68](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/68) ([rndmh3ro](https://github.com/rndmh3ro))
+- improve support for API parameters [\#66](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/66) ([schurzi](https://github.com/schurzi))
+- Notification templates [\#64](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/64) ([rndmh3ro](https://github.com/rndmh3ro))
+
+**Fixed bugs:**
+
+- fixed "command is missing" while trying to create a command [\#69](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/69) ([xFuture603](https://github.com/xFuture603))
+
+**Closed issues:**
+
+- icinga\_commands with "imports" not working [\#63](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/issues/63)
+- Add ability to create notification\_template [\#62](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/issues/62)
+- Can't use fields available in API - e.g. host\_template - has\_agent [\#59](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/issues/59)
+
+## [1.8.1](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/tree/1.8.1) (2020-11-05)
+
+[Full Changelog](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/compare/1.8.0...1.8.1)
+
+**Implemented enhancements:**
+
+- Unsupported parameter "Notes" for icinga\_host [\#50](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/issues/50)
+- added vsc code snippets [\#57](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/57) ([xFuture603](https://github.com/xFuture603))
+
+## [1.8.0](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/tree/1.8.0) (2020-10-28)
+
+[Full Changelog](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/compare/1.7.1...1.8.0)
+
+**Implemented enhancements:**
+
+- Add support for notes and notes\_url to all relevant objects [\#56](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/56) ([mmslkr](https://github.com/mmslkr))
+
+## [1.7.1](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/tree/1.7.1) (2020-10-26)
+
+[Full Changelog](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/compare/1.7.0...1.7.1)
+
+**Fixed bugs:**
+
+- Icinga Object "Service" rerun - failed to recreate if object\_name contains spaces [\#52](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/issues/52)
+- allow using whitespaces in object names [\#55](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/55) ([schurzi](https://github.com/schurzi))
+
+**Merged pull requests:**
+
+- improve coverage of new service module [\#51](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/51) ([rndmh3ro](https://github.com/rndmh3ro))
+
+## [1.7.0](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/tree/1.7.0) (2020-10-23)
+
+[Full Changelog](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/compare/1.6.0...1.7.0)
+
+**Implemented enhancements:**
+
+- update examples and tests so they can actually be deployed [\#54](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/54) ([rndmh3ro](https://github.com/rndmh3ro))
+- add check\_command arg to service\_apply module [\#53](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/53) ([rndmh3ro](https://github.com/rndmh3ro))
+
+**Closed issues:**
+
+- Add object "Service" for a Host [\#42](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/issues/42)
+
+## [1.6.0](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/tree/1.6.0) (2020-10-22)
+
+[Full Changelog](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/compare/1.5.0...1.6.0)
+
+**Implemented enhancements:**
+
+- add new service module [\#32](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/32) ([rndmh3ro](https://github.com/rndmh3ro))
+
+## [1.5.0](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/tree/1.5.0) (2020-10-02)
+
+[Full Changelog](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/compare/1.4.3...1.5.0)
+
+**Implemented enhancements:**
+
+- Add Support for Zones and Endpoints [\#48](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/48) ([arbu](https://github.com/arbu))
+- Create codeql-analysis.yml [\#47](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/47) ([rndmh3ro](https://github.com/rndmh3ro))
+
+**Merged pull requests:**
+
+- add example and test for command without args [\#46](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/46) ([rndmh3ro](https://github.com/rndmh3ro))
+
+## [1.4.3](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/tree/1.4.3) (2020-10-01)
+
+[Full Changelog](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/compare/1.4.2...1.4.3)
+
+**Fixed bugs:**
+
+- Hosts in state absent don't require import parameter [\#44](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/issues/44)
+- when deleting objects, only the object\_name is required [\#45](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/45) ([rndmh3ro](https://github.com/rndmh3ro))
+
+## [1.4.2](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/tree/1.4.2) (2020-09-25)
+
+[Full Changelog](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/compare/1.4.1...1.4.2)
+
+**Implemented enhancements:**
+
+- add timeout parameter to icinga\_command.yml [\#43](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/43) ([AnBenn](https://github.com/AnBenn))
+
+## [1.4.1](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/tree/1.4.1) (2020-09-02)
+
+[Full Changelog](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/compare/1.4.0...1.4.1)
+
+**Implemented enhancements:**
+
+- make local testing without ansible-test work [\#41](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/41) ([rndmh3ro](https://github.com/rndmh3ro))
+- Add more Integrationtests [\#39](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/39) ([rndmh3ro](https://github.com/rndmh3ro))
+- Testing update [\#38](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/38) ([rndmh3ro](https://github.com/rndmh3ro))
+
+**Fixed bugs:**
+
+- No IPv6-Address Variable for Hosts [\#36](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/issues/36)
+
+**Merged pull requests:**
+
+- add badge to readme [\#40](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/40) ([rndmh3ro](https://github.com/rndmh3ro))
+
+## [1.4.0](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/tree/1.4.0) (2020-08-04)
+
+[Full Changelog](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/compare/1.3.2...1.4.0)
+
+**Implemented enhancements:**
+
+- add support for address6 on host object [\#37](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/37) ([schurzi](https://github.com/schurzi))
+
+## [1.3.2](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/tree/1.3.2) (2020-07-15)
+
+[Full Changelog](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/compare/1.3.1...1.3.2)
+
+**Implemented enhancements:**
+
+- make local testing without ansible-test easier [\#33](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/33) ([rndmh3ro](https://github.com/rndmh3ro))
+
+**Fixed bugs:**
+
+- added code in icinga\_command.yml to make it work like the other tasks in our role [\#35](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/35) ([xFuture603](https://github.com/xFuture603))
+
+**Merged pull requests:**
+
+- update examples and bash script for new testing paths [\#31](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/31) ([rndmh3ro](https://github.com/rndmh3ro))
+
+## [1.3.1](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/tree/1.3.1) (2020-07-07)
+
+[Full Changelog](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/compare/1.3.0...1.3.1)
+
+**Merged pull requests:**
+
+- replace hyphen in role name with underscore [\#29](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/29) ([rndmh3ro](https://github.com/rndmh3ro))
+
+## [1.3.0](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/tree/1.3.0) (2020-07-07)
+
+[Full Changelog](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/compare/1.2.2...1.3.0)
+
+**Implemented enhancements:**
+
+- Ansible icinga role [\#28](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/28) ([michaelamattes](https://github.com/michaelamattes))
+
+## [1.2.2](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/tree/1.2.2) (2020-06-26)
+
+[Full Changelog](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/compare/1.2.1...1.2.2)
+
+**Implemented enhancements:**
+
+- Use ansible-test to run integration tests [\#27](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/27) ([rndmh3ro](https://github.com/rndmh3ro))
+
+**Fixed bugs:**
+
+- zone: defaults to master but i do not want to configure zone at all. [\#25](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/issues/25)
+
+**Merged pull requests:**
+
+- do not set zone to master in host and hosttemplate [\#26](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/26) ([rndmh3ro](https://github.com/rndmh3ro))
+
+## [1.2.1](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/tree/1.2.1) (2020-06-25)
+
+[Full Changelog](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/compare/1.2.0...1.2.1)
+
+**Implemented enhancements:**
+
+- Integration testing [\#24](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/24) ([rndmh3ro](https://github.com/rndmh3ro))
+- Add proper linting [\#22](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/22) ([rndmh3ro](https://github.com/rndmh3ro))
+
+## [1.2.0](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/tree/1.2.0) (2020-06-24)
+
+[Full Changelog](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/compare/1.1.4...1.2.0)
+
+**Implemented enhancements:**
+
+- add gitattributes because of windows line endings [\#21](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/21) ([rndmh3ro](https://github.com/rndmh3ro))
+- add icinga\_host\_template [\#20](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/20) ([michaelamattes](https://github.com/michaelamattes))
+- add troubleshooting section [\#19](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/19) ([rndmh3ro](https://github.com/rndmh3ro))
+
+**Fixed bugs:**
+
+- do not require import and check\_command in host\_template [\#23](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/23) ([rndmh3ro](https://github.com/rndmh3ro))
+
+**Closed issues:**
+
+- Error creating servicegroups [\#13](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/issues/13)
+
+## [1.1.4](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/tree/1.1.4) (2020-06-12)
+
+[Full Changelog](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/compare/1.1.3...1.1.4)
+
+**Implemented enhancements:**
+
+- further improve error messages for different errors [\#18](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/18) ([rndmh3ro](https://github.com/rndmh3ro))
+- added required ansible version to readme.md [\#17](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/17) ([xFuture603](https://github.com/xFuture603))
+
+## [1.1.3](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/tree/1.1.3) (2020-06-09)
+
+[Full Changelog](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/compare/1.1.2...1.1.3)
+
+**Implemented enhancements:**
+
+- try to improve error messages [\#16](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/16) ([rndmh3ro](https://github.com/rndmh3ro))
+- add steps to update galaxy.yml in publish action [\#15](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/15) ([rndmh3ro](https://github.com/rndmh3ro))
+
+## [1.1.2](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/tree/1.1.2) (2020-06-09)
+
+[Full Changelog](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/compare/1.1.1...1.1.2)
+
+**Implemented enhancements:**
+
+- add action to publish to galaxy [\#14](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/14) ([rndmh3ro](https://github.com/rndmh3ro))
+- github-action to automatically create release-drafts [\#12](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/12) ([rndmh3ro](https://github.com/rndmh3ro))
+- remove unused intermediate assignments [\#11](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/11) ([schurzi](https://github.com/schurzi))
+
+**Fixed bugs:**
+
+- assign\_filter variable in icinga\_notification module should be a string [\#9](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/issues/9)
+
+## [1.1.1](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/tree/1.1.1) (2020-06-04)
+
+[Full Changelog](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/compare/1.1.0...1.1.1)
+
+**Implemented enhancements:**
+
+- fix issue \#9 - define assign\_filter as string [\#10](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/10) ([FLiPp3r90](https://github.com/FLiPp3r90))
+
+## [1.1.0](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/tree/1.1.0) (2020-05-25)
+
+[Full Changelog](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/compare/1.0.0...1.1.0)
+
+**Implemented enhancements:**
+
+- Add icinga command template [\#8](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/8) ([mmslkr](https://github.com/mmslkr))
+
+**Fixed bugs:**
+
+- fix name of imports [\#7](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/7) ([rndmh3ro](https://github.com/rndmh3ro))
+
+## [1.0.0](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/tree/1.0.0) (2020-05-15)
+
+[Full Changelog](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/compare/2492296965515a9ac885c6a4874acba8a7475895...1.0.0)
+
+**Merged pull requests:**
+
+- update urls, lowercase name [\#6](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/6) ([rndmh3ro](https://github.com/rndmh3ro))
+- replace - with \_ [\#5](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/5) ([rndmh3ro](https://github.com/rndmh3ro))
+- alter readme to accommodate for collection [\#4](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/4) ([rndmh3ro](https://github.com/rndmh3ro))
+- Linting fixes [\#3](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/3) ([rndmh3ro](https://github.com/rndmh3ro))
+- Create main.yml [\#2](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/2) ([rndmh3ro](https://github.com/rndmh3ro))
+- Create ansible-lint.yml [\#1](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/1) ([rndmh3ro](https://github.com/rndmh3ro))
+
+
+
+\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
diff --git a/ansible_collections/t_systems_mms/icinga_director/CHANGELOG.rst b/ansible_collections/t_systems_mms/icinga_director/CHANGELOG.rst
new file mode 100644
index 000000000..44e145efe
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/CHANGELOG.rst
@@ -0,0 +1,229 @@
+===========================================
+T_Systems_Mms.Icinga_Director Release Notes
+===========================================
+
+.. contents:: Topics
+
+
+v1.33.1
+=======
+
+Bugfixes
+--------
+
+- add icinga_deploy_* to action_group and test it (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/214)
+
+v1.33.0
+=======
+
+Minor Changes
+-------------
+
+- Add Icinga Deploy handler and module (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/205)
+
+New Modules
+-----------
+
+- t_systems_mms.icinga_director.icinga_deploy - Trigger deployment in Icinga2
+- t_systems_mms.icinga_director.icinga_deploy_info - Get deployment information through the director API
+
+v1.32.3
+=======
+
+v1.32.2
+=======
+
+v1.32.1
+=======
+
+v1.32.0
+=======
+
+Minor Changes
+-------------
+
+- Add zone to user and notification template (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/198)
+
+v1.31.5
+=======
+
+v1.31.4
+=======
+
+v1.31.3
+=======
+
+v1.31.2
+=======
+
+v1.31.1
+=======
+
+v1.31.0
+=======
+
+Minor Changes
+-------------
+
+- Add flapping support to service template module (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/180)
+- Add icon support to service template (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/179)
+
+v1.30.2
+=======
+
+v1.30.1
+=======
+
+Bugfixes
+--------
+
+- Add exception handling to diff and exist functions (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/176)
+
+v1.30.0
+=======
+
+Minor Changes
+-------------
+
+- Add action_group to enable module default groups (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/175)
+
+v1.29.1
+=======
+
+v1.29.0
+=======
+
+Minor Changes
+-------------
+
+- Add icinga_serviceset module (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/163)
+- Test more ansible versions (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/162)
+
+New Modules
+-----------
+
+- t_systems_mms.icinga_director.icinga_serviceset - Manage servicesets in Icinga2
+
+v1.28.1
+=======
+
+Minor Changes
+-------------
+
+- Test more ansible versions (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/162)
+
+v1.28.0
+=======
+
+Minor Changes
+-------------
+
+- Added missing fields to 'icinga_host' and 'icinga_host_template' (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/158)
+
+Bugfixes
+--------
+
+- role: add check_command to icinga_service_apply (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/161)
+
+v1.27.2
+=======
+
+v1.27.1
+=======
+
+v1.27.0
+=======
+
+Minor Changes
+-------------
+
+- Add possibility to use Compose and keyed groups in inventory-module (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/155)
+
+v1.26.0
+=======
+
+Minor Changes
+-------------
+
+- add option to append arguments to all modules (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/153)
+
+v1.25.1
+=======
+
+v1.25.0
+=======
+
+Minor Changes
+-------------
+
+- Add Icinga scheduled downtime module (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/146)
+
+Bugfixes
+--------
+
+- added a fix for the new scheduled_downtime module (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/150)
+
+v1.23.1
+=======
+
+Minor Changes
+-------------
+
+- add resolve option to inventory-plugin (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/147)
+
+v1.23.0
+=======
+
+v1.22.1
+=======
+
+v1.22.0
+=======
+
+Minor Changes
+-------------
+
+- Add support for retry_interval and max_check_attempts to host template (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/140)
+
+v1.21.2
+=======
+
+v1.21.1
+=======
+
+Bugfixes
+--------
+
+- Changed place in the creation order of service object in ansible_icinga role (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/135)
+
+v1.21.0
+=======
+
+Minor Changes
+-------------
+
+- Add event_command parameter to icinga_service_apply module (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/132)
+- Add event_command parameter to service apply playbook to enable usage (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/133)
+
+v1.20.1
+=======
+
+v1.20.0
+=======
+
+Minor Changes
+-------------
+
+- Add some more documentation on command template (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/128)
+- add "vars" variable to icinga_notification in the role (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/129)
+
+v1.19.0
+=======
+
+Minor Changes
+-------------
+
+- add notification_template to role (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/125)
+
+v1.18.1
+=======
diff --git a/ansible_collections/t_systems_mms/icinga_director/CODE_OF_CONDUCT.md b/ansible_collections/t_systems_mms/icinga_director/CODE_OF_CONDUCT.md
new file mode 100644
index 000000000..0164155b8
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/CODE_OF_CONDUCT.md
@@ -0,0 +1,3 @@
+# Community Code of Conduct
+
+Please see the official [Ansible Community Code of Conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html).
diff --git a/ansible_collections/t_systems_mms/icinga_director/CONTRIBUTING.md b/ansible_collections/t_systems_mms/icinga_director/CONTRIBUTING.md
new file mode 100644
index 000000000..ea370c2ac
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/CONTRIBUTING.md
@@ -0,0 +1,54 @@
+## Local Development and testing
+
+We accept all kinds of contributions, whether they are bug fixes, pull requests or documentation updates!
+
+If you want to develop new content for this collection or improve what is already here, the easiest way to work on the collection is to clone it into one of the configured [`COLLECTIONS_PATH`](https://docs.ansible.com/ansible/latest/reference_appendices/config.html#collections-paths), and work on it there.
+
+For example, if you are working in the `~/dev` directory:
+
+```
+cd ~/dev
+git clone https://github.com/T-Systems-MMS/ansible-collection-icinga-director collections/ansible_collections/t_systems_mms/icinga_director
+export ANSIBLE_COLLECTIONS_PATH=$(pwd)/collections:$ANSIBLE_COLLECTIONS_PATH
+```
+
+You can find more information in the [developer guide for collections](https://docs.ansible.com/ansible/devel/dev_guide/developing_collections.html#contributing-to-collections), and in the [Ansible Community Guide](https://docs.ansible.com/ansible/latest/community/index.html).
+
+
+### Linting with tox
+
+After making code changes, please run the linters and fix all errors:
+
+```
+> tox -elinters
+```
+
+### Updating the tests and examples and runtime
+
+If you add new features or arguments to the existing modules, please add them to the examples in the module itself.
+The integration tests and examples in our documentation are then generated from the module-examples.
+
+To trigger this generation, you need to run the script `hacking/update_examples_and_tests.sh` from the root of the repository. For this you need to have yq in version v3.2.1 installed (see https://mikefarah.gitbook.io/yq/v/v3.x/).
+
+Download example:
+```
+> sudo wget https://github.com/mikefarah/yq/releases/download/3.4.1/yq_linux_amd64 -O /usr/bin/yq ; sudo chmod 755 /usr/bin/yq
+```
+
+If you add a new module, be sure to add it to the `action_groups` in the `meta/runtime.yml`-file.
+
+### Integration tests with docker
+
+```
+# run icinga in a container and forward port 80
+# username: icingaadmin password: icinga
+> docker run --name icinga -d -p 80:80 ghcr.io/t-systems-mms/icinga2:master
+
+
+# run ansible-test
+> ansible-test integration
+
+# alternatively run the test playbooks against the container
+> ansible-playbook tests/integration/targets/icinga/normalmode.yml
+> ansible-playbook tests/integration/targets/icinga/checkmode.yml
+```
diff --git a/ansible_collections/t_systems_mms/icinga_director/FILES.json b/ansible_collections/t_systems_mms/icinga_director/FILES.json
new file mode 100644
index 000000000..6b08a8fbf
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/FILES.json
@@ -0,0 +1,1244 @@
+{
+ "files": [
+ {
+ "name": ".",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "changelogs",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "changelogs/.plugin-cache.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "22a81c2904219dde527c199dd785f26d367545894246859fb80b8a0efcf1cd24",
+ "format": 1
+ },
+ {
+ "name": "changelogs/changelog.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "acf35d489540145837579deb3bf91a1966457ab9b6c3a174318a446a8e1d65ec",
+ "format": 1
+ },
+ {
+ "name": "changelogs/config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "533b067a4ca460ac9d8d401689b78360b8cb325ec06af332acc7e90a23517247",
+ "format": 1
+ },
+ {
+ "name": ".gitattributes",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b2deb48e94193846f3933845436e4b28bd819b7e54f87f713c4e45925e84d645",
+ "format": 1
+ },
+ {
+ "name": "renovate.json",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "62c0ece7fb8333ae1ce74004a965d9251944b4c3b524c986739101d6c5e765cf",
+ "format": 1
+ },
+ {
+ "name": "examples",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_user_group.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1723d37491b4fd7c660635cc0b408f1aa4e9cf60f57263bb75e30681caa6fb47",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_service_apply_info.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "92bc47cd164d3589016b8aa91632cdef7ca4ea6556d96276fc8e5243d7a07b20",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_timeperiod_template_info.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b727f5520baccc05780a18a68932c4f1d0df6225f8d8bb7c846cca8f4f8d3569",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_user_template.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3a72ee6a8f2ba46b18a9c40526a27c95beb272a7b574a3f6ebc4eceb54c5bcaf",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_endpoint.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "971aee42eab419fcf307a136e3518839bc10ac81650c67d77387fb5a638dc819",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_servicegroup.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1b2e7bd3e7f86fa5097893f9e8645c0df9637f21493564d134072da8d707a8f4",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_timeperiod.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3274badeb1afebe1f951b5d9a44ec1f53beeae8f32b32df2dc7fa687e94035ba",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_scheduled_downtime.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b9c12a40331ebeb1e162ffd372765d58e5ba8a4e879008d8bf4d15c8c695dcef",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_service_template.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "25d23c86e75ab3567a1f9400d29275d75673e29fc96d065af5fc15ab9b53cc45",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_zone.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ad5906f6dab6417bc12651627876988c60cc5d213af80154fac45a365064d1a1",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_service_info.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f64b725f3b36a8ebc84549982c7d451eaf7ccbd2dd564654e788c1093c9ef868",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_timeperiod_info.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "72d8aa80de89baf1469f8b2092709816eeb20d53da11542a74a07765d18cc398",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_endpoint_info.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4be975be198bee1295143d018ba75ad3f3eed8100739ee682fc73223f78fa986",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_user_template_info.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1c7951a4d17f9a64f9416d21101966f3bf571da02a936b266239a2e89ea40ff2",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_command.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a75c6867d1e87e94e3977e31e268f749116f587482bce1a6bdf6b93b871ff539",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_service.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1359e5f079dadd1d24c9d2e57d1187a426b11ea1340bd594c96d8775261129a4",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_host_info.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cea113a474d0dcafbc19e0932873b965ae3719072f5ce4d85ce3c82b9cf1a730",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_notification.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "db33c7cc5d894abcb65234ae72706cec7d3d2fe5d553621b6abc005917896bc1",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_service_apply.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "115b28e14dda5fa6347d6c79982e2377a4ddbf2df70de5b3299d40605973f100",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_notification_template_info.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2cec40152c403178b9160c94582f6b6bd95480dc190b121dc2c74a87c6036a96",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_user.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "816381b16bfd619b2854bfd918bb28a8f18d8fc49babe9862d52bbb35eaa0135",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_timeperiod_template.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "955f1307fe61e555de9af0024c0dd9b7d7f6082794b5b9b12fbfda8d96620525",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_hostgroup_info.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "59834f05b1059d25503081eac4a9fc04340eb05be49daa2f091c57c1517196da",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_serviceset.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2021e4e10dc0b86f7b327844b9e898171b62bd55fc959bb519ba2afed5a1611e",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_command_info.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ed334b6537dec4a946336d881fa4809e0f0994e8f95ae5ece59307386fa0524f",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_user_group_info.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6e03996b374ca3272b16ffa95eccab306c3936807c02aade2d33fbb12fb4bd9a",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_servicegroup_info.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b34f0040ed5e1dacdbd6bfb6c16ceba94b8bb418b927f493e9e9bf88ebf12fe9",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_host.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fc79d130d13a8893525d0bbd89779dd05e95d177f25d5c504b2f42521008b6e3",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_hostgroup.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e02bb643589ce7ca3e1eabeed37cd45f67874f42142aa599d484bbdeb0e139b2",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_host_template_info.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "441341d80fe2703c0be2a529072b30252164133b9af9e70db4fddf8b726ef36a",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_command_template.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9a7c82dd3d60483fffae3ec661ced8659e63d93c7adef28235e7d86e622c01ba",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_host_template.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "832c3073baa33a489a3a05801383e7b287d864708827a3c2b59f974a0991bd2a",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_user_info.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e8b33a987d52a95953397a2ca2d18400287bf34fff70729341da937b47a35593",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_service_template_info.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "36cc569afd00a513c2919aacd2d0a9991205d149a93701ff54da21d282f0d5bb",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_deploy.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "519b2c5324aa06d18e955454873d6c8ab37f952d4f9608551f8aaeff4e8d9c22",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_deploy_info.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bf8734951ae925f622941c4828fdb7e966ba3af164a00842d7b137f484117e9f",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_zone_info.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b452657b89bc0f8a64efb44ff5abf745a140c3c110e763490faec07b8453cf90",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_command_template_info.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d3a9dbb74bb1263f63fffd6a369cd4ad7118ee3c10e5eee5fa3c63dc90c6285a",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_notification_template.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7e82c7a810d5343e8a0b6d4be1b7ead92ecfc678f4b155fbd930b0751a0c1956",
+ "format": 1
+ },
+ {
+ "name": "examples/icinga_notification_info.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "da8a188dfe62b5afb5208cea0a0b147f934d6e28c720a07a2719c2f95dfdd0a6",
+ "format": 1
+ },
+ {
+ "name": "meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "meta/runtime.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7987b97d023a17278e43b9e5977acb7a3717efc4997816565f9471c67e48999e",
+ "format": 1
+ },
+ {
+ "name": "plugins",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/modules",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_host_template_info.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8fcccb1ef1b1b30f3e2b3bfe0dbd77a1b36bc25d10dedc83ba1c665060f86426",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_user.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "92397ae6663b89b35882437736dfc71b1f724fad795b4fd5a31bd497949d9b9f",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_serviceset.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8fe1d6bb4df878334f8e9ed68c42fae3594ef80c2cee9503b2edf6825f144cc3",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_user_template.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3493e0a3403cfb94c07df2b8e2b7f322e31faa000aa2048bb1eaa32e7cd0111c",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_timeperiod_template_info.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "be759e82d31a8a44fd9e9a9f1141de4dc1560934c2be262fa3d0b0a09f825f3a",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_command.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0ccdd796e15361f442022142eb23a0679cfd1decf149754e9e9f0cd26ecb9473",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_zone_info.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "08c4fdf38acf0d033124a6bc0f31fbe8881150b0df0dca1894485436a60908c6",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_zone.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bb2a5c70393ec96e61c3e38f84c9815772c6e2d7130b5b0deab08a52dd95422e",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_hostgroup_info.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9eee707edb50b097da76bde0db4cefb5614a98f4e6babe0f5c7b1976f1a148da",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_notification.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e8938cc424cd98c789838d57f7f13bd33cfd66b0b56f29576aa1461e4bf19ea3",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_timeperiod.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1aa1899ceee176a35a7d2c80a22bd358986f9a98e771e56013f8d5659f514637",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_timeperiod_template.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "caa0db3f7a924c3fc0c3c58ec3e58e4471bc5748bcc0dcd881fcec58902c2840",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_endpoint.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f2743681798cb27386e63f16a492c477d169b6ef118a8848a6ad2dbd3172bfce",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_deploy.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "55eb237f52e3095b6bffa6a9a2357776c1d88349f2ba310a2eded8e8422184ab",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_notification_template_info.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "645b315b8b8f8f95c81e2af0e18a438ac962b36d729a7c01073fd71ae3b0f1cd",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_user_group.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4d04148654c2af1781ecc4303a06d473f1dd92e2ccaa9c5b04ceeec859d324c6",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_user_info.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fc09b712e7735ad7a136289cec56cdbe2a706bd73a16fc217fcf08e37ffc455c",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_timeperiod_info.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c24367537816d62fec5f1f6868f2d7761e608d23f3297aac870b5a5099697cba",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_service.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "05cc91f341eb007d56202cf69636b650843d0e35487d4cef38a27ae67dd1634f",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_endpoint_info.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bd745c61ad54f072ff79fb1ab7508cf51539b9d0bdd386e9a4dde90f1766ae6c",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_user_template_info.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0e19d7d217e7202b3d32ed07f8eed632e2962bf8d3654cc2e723f4e54f215946",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_service_info.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "09e751d964d3035ece1043f99af53deccefa648036104e52ae379b1c6ab129c5",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_command_template_info.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "113f6811ea3ecc0e8ac4e49013cdecf39a91f8f2dcd2098ab0ad62124336f669",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_host_template.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "26d38595044856d6051845b7c61b5f395dd628af737dec2191dfdcf2f332cfea",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_service_apply_info.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "245aed0a52468716145086959890f1c6cf6cac163dcc21b01031481cb502ee3d",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_servicegroup_info.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "600acef5b6f6af20a29e4b1a35f0c5f11eda99124878a4d357d4d2e5288802fb",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_service_apply.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "349a442d30dec89ec7dec336d16e776b2f68f411c2f4c321291299f4bbc20172",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_user_group_info.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "279ec4f08bc5e17f80adbdd0d27e45643bf1b621e0847cce8fd6d0e1fc6135b8",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_notification_template.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7a37c7dfba5ebd35c0c52c4059690fcdf50e33729da09da893b0f2c59527ae26",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_service_template.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ca14a0edd2686c57322740949a4f588311998ef55ea606cef26b9938a16730f9",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_scheduled_downtime.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "50519794b714f5ee454ac539b7440393406002e5c17e46f8bf1e30562973fb5e",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_host.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7eda3e42b0a05a85c16397caffc986c0cbbe003883831a214f3e60f9e1203746",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_hostgroup.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "85dac7fc9f5d27f9a6c73d025e3b13d01dfa34ed1208af43355e25443a35c479",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_notification_info.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "291dc941412e7bf28c7bc80c49677d9e300a125657340020f3b3ec29cf066086",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_command_info.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4d783e1bf9124a28a9add176dfd998fba75a9154fa71a0c0462770d027ea1807",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_host_info.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ecd241c71d80b85bb088c321dfcc263849968d31f59d2c4fdce05bb571ddd2e2",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_servicegroup.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9ef4844d83200cfe61b6e69cbb73049b8654301799e228d70b4621b2ce4daa67",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_service_template_info.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "191b729e269808d191053091ab912ea4a7485f0fe1ef988b0b02b294c8815e88",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_command_template.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8e927765f7419dd8e2413988dc641e521da319034fcee3e733639a7608b873e5",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/icinga_deploy_info.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7b0e556b9518b650b8f2f05cd2b507e89a2f130e562041ef47303ea1b1ac4647",
+ "format": 1
+ },
+ {
+ "name": "plugins/inventory",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/inventory/icinga_director_inventory.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e1620efba7d1fad8d747da0a0517c3a1d909f5f1119aa371c8c5d91f6b513ed3",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/icinga.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a17012640e0de964ad91678334aafd451c37e18566e4bb852374c764f0e857d8",
+ "format": 1
+ },
+ {
+ "name": "plugins/doc_fragments",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/doc_fragments/common_options.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4636a41b3a10c7786474a983e2e95c4098b9134c4ea779322639c4907380714e",
+ "format": 1
+ },
+ {
+ "name": ".gitignore",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0cb2d7d561d8f1feb38146d6c58c6143c7568b624e2ab6cf03ebc6247e35c991",
+ "format": 1
+ },
+ {
+ "name": "CHANGELOG.md",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bff5fe11fc8ae937e8995748829f75bcddbd2520ce3830c4f86b2997ae23f69b",
+ "format": 1
+ },
+ {
+ "name": "docs",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_hostgroup.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "acd09fcd9dc07fe7611cfe9a91d2214d52dc521ad5e808cb3b9831c12088eae8",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_notification_template.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "567220632b5b7dda1c1ff3eb827f2eaa16f86cf2a29fe2176d9e344bcca9b4fa",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_deploy_info.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "17b1e4cd342fbd22e5b01dba58a55f4d3f4f8ac982b1270220a9ede3db70612f",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_user_group_info.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8280570318d838adfb063c21b437091569ebe2d0670203132549315fac7c829",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_service_apply_info.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f4450dddd0190bd88a388a74cad3d890d9f64273a7e827cd5ebe22cc8902a5b3",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_zone.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2cbbe55d04f733b823c6d6b6501431fd68a591d647e09c5c75294caeb0abc483",
+ "format": 1
+ },
+ {
+ "name": "docs/.gitkeep",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_endpoint_info.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a5e036a329068c6f863397005b1578f74e61ac7ed4e3e30283c7d510aed7c5e5",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_user_group.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fd2c3912a2354b17191a61b39ab03c38aeef45bc4bb61800ca662b4d27365e9c",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_scheduled_downtime.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "189d3b9e93c77ea94c7629477342b12a97642ab37a6afb26b3ed2b765b23fed7",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_timeperiod_template.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3906352d27ab837c53ee3136caccefdd843519b9bb43fe622b0543da96249ceb",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_service_apply.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "65a7e19fde596598e41a6a67239fee6570450362dab11d0691542ecb5095f5c8",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_command_template_info.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "eda38278f03df18f85295a688a7618209e71edc69e62af9c2a0936ff3d9d0966",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_notification.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9cd353276f8b37f2b3e1fad52e47b888bdaecc0b6e2fb8d42456866b3b37ec00",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_service_template.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0ee25b013d9007fffb3598df407288675468cc2994bb2d96b80583b2ebd47311",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_service_info.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a35f143f9b91980ae4680652f336c554195426c8d2fb4ad2d039d4f209d1d66b",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_hostgroup_info.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9850a99bc56e2f109211f7a880a8371dfaa896a072c15874504bc156ef3a3b5a",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_user_template_info.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d44cc1a908130c3fe4c0341f2a60fc09eca7d52d642e3def432d8665e86737ed",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_zone_info.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "57d3ca7ea79919229c86b76cc9e4dbf245d0755df70bfb9064af1dffb65592a2",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_service_template_info.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b8a35e8d299ff8188d877a59c328f9d722d5a5bba789de098b1f35a19f608928",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_endpoint.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f0935c2e01bf8abc5fe9767323b3832c554b760494aebb7560c03d705ad55e4c",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_host_info.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "90eca68c6efa546266de707e70d096d3559ff6f4949ef06bf55992eeb64a2466",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_serviceset.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0ffc506db7a9eaceb474ae157fc5a25cb768b91c72436a42a8a2890790be3e46",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_deploy.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cbdafa0783d0e11182fad8222d582f5fcc856eea59dfb5daecd248469c0b3903",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_user_info.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a88d2a8ad032aa44bd28b6dc3b646a462f2a76342c6262f533c4a58c0c27699f",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_timeperiod_template_info.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "34758d7eaa0c89196981845e45fcca76edc1c73a7d960a29d4c95cf451055cd1",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_timeperiod_info.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f8ab90d8b94be422e5e35be8418c78c710316f4be43e1632d6b17a675046bbca",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_director_inventory.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "828dcac77fcea9cf165f09b8ee977e5e9b5a743c7fbcce88ec441495d3f2012f",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_host.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4b6a0bacb5dc3cd9704a89c116e5f0253ca959452d73fd15c3fac3ba5171c4e5",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_servicegroup_info.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1c446d3c16e4eca3dcf23fd9c41425c9f42751b0373176058a854495e1637341",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_command_info.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cd607877eb0b15828f86377641168663da9dafd2589181d37bf6bae9393db39f",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_host_template_info.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b504363aebfa06b7772dc594317e1734ff201f89ddf6d9c97fcded38401cbbe4",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_service.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "44fbc9760c141b8123b29ba7ac6f90f073914333ec722dad0cb84a07e8e5a9dc",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_host_template.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6024a76cee65dee0a9c5e90f55bf1e1a09e034112202a45b70eb6a4fde741fba",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_notification_template_info.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "560cd581964a746e639457b38c5cedd17780a435df4b525b662c62a75c7f9973",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_command_template.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fc9badf439acb02fdcf3b39d74c45b4081fb6166896e5d8505cebf5b48a37e34",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_timeperiod.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e71ae0d17b45fdf9ccbaa32a98ab8d5d0dbfc6379f30fe025138888bc26a16d7",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_notification_info.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ffba73c7e56c7d820f9ba37e98fbb1377a5dbb910edb2c42c889fc62b24b00f2",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_command.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b5eb7dfc0a8831ab98a06d916e4ba7937e5dcc09b758e83cc354bcca2d346395",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_user.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d70b4c3167e4b7bf31531c5cbb920645a7df94cb931d906f2dccaea4b041cdb6",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_servicegroup.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c34059e37fe744aa646642964648ecf96e8cfc4fc89dbbf1503093e972f7ae97",
+ "format": 1
+ },
+ {
+ "name": "docs/icinga_user_template.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "90242de8e8a827e83e6493188654aa1838209e6b3935c5d3d195d3ef4e870aea",
+ "format": 1
+ },
+ {
+ "name": "CODE_OF_CONDUCT.md",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "14ec928234a7ed52bf8b458d31e4862335111e477e4dbe7fb543686c24115140",
+ "format": 1
+ },
+ {
+ "name": "CONTRIBUTING.md",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0df404e64cab70af27d307545d9c5352afead1e5d0ffe02a5681b0514368d99d",
+ "format": 1
+ },
+ {
+ "name": "roles",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "roles/ansible_icinga",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "roles/ansible_icinga/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "roles/ansible_icinga/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "780a4de8019cec4270f3d69ea9b72cb2198e19efc1a1e48bf0a82306f1b6055c",
+ "format": 1
+ },
+ {
+ "name": "roles/ansible_icinga/handlers",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "roles/ansible_icinga/handlers/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a1bbd5fb6ba8c97382aa71c8637fe65e8604e2200a3cbf7a444390f816e51b62",
+ "format": 1
+ },
+ {
+ "name": "roles/ansible_icinga/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "roles/ansible_icinga/defaults/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b37f3b9d942e8ef665c760298b361ebf9b1ee62d0ca2f1c8c365b12649cdccef",
+ "format": 1
+ },
+ {
+ "name": "roles/ansible_icinga/README.md",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7c9b37861f350497997875e2d82293fee8d82b0ebb897e3cefa927b67ce50321",
+ "format": 1
+ },
+ {
+ "name": "roles/ansible_icinga/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "roles/ansible_icinga/tasks/icinga_user_template.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e08ecac2e205d4ff1a3824b2053f3c916b124f2c6607b53ae8d7a906e2aa0cde",
+ "format": 1
+ },
+ {
+ "name": "roles/ansible_icinga/tasks/icinga_endpoint.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e9bff8ec9f24722912d56fe4aef10678726f43171e75787044ede75fd922f8ed",
+ "format": 1
+ },
+ {
+ "name": "roles/ansible_icinga/tasks/icinga_servicegroup.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c2a6537dcf570c01b0174c1d2a3ec0617f6e2c3b88a3712f729179dbe042332f",
+ "format": 1
+ },
+ {
+ "name": "roles/ansible_icinga/tasks/icinga_timeperiod.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d93eaf04ff4345e95f5442b8d65736936a65db5bb3bdbdd8c88dcaf800133b62",
+ "format": 1
+ },
+ {
+ "name": "roles/ansible_icinga/tasks/icinga_scheduled_downtime.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "78e3755dc97d04e11d42879ba76ca3d2ce77b726bb5bb8b08892a7f996ab746d",
+ "format": 1
+ },
+ {
+ "name": "roles/ansible_icinga/tasks/icinga_service_template.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "42278e746dcc5a542cb09118c077bd7b09cf58c11c2bde8a1d2b97cd948b55be",
+ "format": 1
+ },
+ {
+ "name": "roles/ansible_icinga/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c78b9cb1b47b8fed5166803121a998d0f7cd44bc7840f2a5fb9074dfd7bae6e1",
+ "format": 1
+ },
+ {
+ "name": "roles/ansible_icinga/tasks/icinga_zone.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9f60ea308d382cbe5bff05ad356e83642a56311bcab056ab43d3f44bc05aa151",
+ "format": 1
+ },
+ {
+ "name": "roles/ansible_icinga/tasks/icinga_command.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c9dfd5df8e7f84087bfbb6ef993f49bb8db875c8b09496f4c1a62550ee430995",
+ "format": 1
+ },
+ {
+ "name": "roles/ansible_icinga/tasks/icinga_service.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b1c45c43c43b4a9b5191bd82d7f7af12fea23b278f6824a47fbd92430d0e6b9f",
+ "format": 1
+ },
+ {
+ "name": "roles/ansible_icinga/tasks/icinga_notification.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b070e387a00a888c727fded1c0e606071a3b17d330e2b804e09facf25b489b69",
+ "format": 1
+ },
+ {
+ "name": "roles/ansible_icinga/tasks/icinga_service_apply.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3d698077d5a521445d4ffb3b99da0b00ca68f4949c74ce52a12c0d46a3dc035a",
+ "format": 1
+ },
+ {
+ "name": "roles/ansible_icinga/tasks/icinga_user.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d1a71b5185068e8547ba6b5d8b984a89bf2b9aef5a5570fb01187e3308c6be20",
+ "format": 1
+ },
+ {
+ "name": "roles/ansible_icinga/tasks/icinga_serviceset.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "58759313dc7e005b8305061f763914db20a39d49b355d73d15cd216cd6891edf",
+ "format": 1
+ },
+ {
+ "name": "roles/ansible_icinga/tasks/icinga_host.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cc7a01b09dbc8f55da467561db37a50597fe0f898ca4315b9be142436ed2adb1",
+ "format": 1
+ },
+ {
+ "name": "roles/ansible_icinga/tasks/icinga_hostgroup.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ec9efa8c517983730ba94a9fb8b2887d7403b3f9a8a4472df659c393943a1fd5",
+ "format": 1
+ },
+ {
+ "name": "roles/ansible_icinga/tasks/icinga_command_template.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8557d9101cbc474d273d1a79b36b9267384e815d516c7dc624c259c8ec3c9137",
+ "format": 1
+ },
+ {
+ "name": "roles/ansible_icinga/tasks/icinga_host_template.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "df94796dfa810cdeebaedf6d6aff926a5dd561e92d620054edea2caff09bcc77",
+ "format": 1
+ },
+ {
+ "name": "roles/ansible_icinga/tasks/icinga_notification_template.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7b40258afda97cc0a454a143530b109c6859a5e4e18a525ab091c1b06075cc2f",
+ "format": 1
+ },
+ {
+ "name": "LICENSE",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986",
+ "format": 1
+ },
+ {
+ "name": "README.md",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7015fc8bfe9df8b145073f0714e4dbec691645301aacf925fc1b8b64b0e8522e",
+ "format": 1
+ },
+ {
+ "name": "CHANGELOG.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cd94fefa439ecee0e97ac30993acba2a321721363c1f2832a3ef43fcbae3d5a8",
+ "format": 1
+ }
+ ],
+ "format": 1
+} \ No newline at end of file
diff --git a/ansible_collections/t_systems_mms/icinga_director/LICENSE b/ansible_collections/t_systems_mms/icinga_director/LICENSE
new file mode 100644
index 000000000..f288702d2
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/LICENSE
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<https://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<https://www.gnu.org/licenses/why-not-lgpl.html>.
diff --git a/ansible_collections/t_systems_mms/icinga_director/MANIFEST.json b/ansible_collections/t_systems_mms/icinga_director/MANIFEST.json
new file mode 100644
index 000000000..93e73a10b
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/MANIFEST.json
@@ -0,0 +1,34 @@
+{
+ "collection_info": {
+ "namespace": "t_systems_mms",
+ "name": "icinga_director",
+ "version": "1.33.1",
+ "authors": [
+ "Sebastian Gumprich <sebastian.gumprich@t-systems.com>",
+ "Lars Krahl <lars.krahl@t-systems.com>"
+ ],
+ "readme": "README.md",
+ "tags": [
+ "icinga",
+ "monitoring"
+ ],
+ "description": "This collection contains Ansible modules to change objects in Icinga 2 using the director API.",
+ "license": [
+ "GPL-2.0-or-later"
+ ],
+ "license_file": null,
+ "dependencies": {},
+ "repository": "https://github.com/T-Systems-MMS/ansible-collection-icinga-director",
+ "documentation": "https://github.com/T-Systems-MMS/ansible-collection-icinga-director",
+ "homepage": "https://github.com/T-Systems-MMS/ansible-collection-icinga-director",
+ "issues": "https://github.com/T-Systems-MMS/ansible-collection-icinga-director/issues"
+ },
+ "file_manifest_file": {
+ "name": "FILES.json",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b68fdafe8dcf10a9dee5bb9f443ce49d70151b68751f09fdf7bfa0a29878aa1b",
+ "format": 1
+ },
+ "format": 1
+} \ No newline at end of file
diff --git a/ansible_collections/t_systems_mms/icinga_director/README.md b/ansible_collections/t_systems_mms/icinga_director/README.md
new file mode 100644
index 000000000..dae501e96
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/README.md
@@ -0,0 +1,195 @@
+# Icinga Director Collection for Ansible
+
+[![ci-ansible-test](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/workflows/ansible-test/badge.svg)](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/actions?query=workflow%3Aansible-test)
+[![codecov](https://codecov.io/gh/T-Systems-MMS/ansible-collection-icinga-director/branch/master/graph/badge.svg)](https://codecov.io/gh/T-Systems-MMS/ansible-collection-icinga-director)
+
+This Ansible collection contains:
+
+1. Ansible [modules](plugins/modules/) to change objects in Icinga 2 using the director API.
+Additionally all supported modules have an appropriate `*_info`-module to gather facts about the existing objects in the director.
+
+ * `icinga_command_template`
+ * `icinga_command`
+ * `icinga_endpoint`
+ * `icinga_host_template`
+ * `icinga_host`
+ * `icinga_hostgroup`
+ * `icinga_notification`
+ * `icinga_notification_template`
+ * `icinga_service`
+ * `icinga_service_apply`
+ * `icinga_service_template`
+ * `icinga_servicegroup`
+ * `icinga_serviceset`
+ * `icinga_timeperiod`
+ * `icinga_timeperiod_template`
+ * `icinga_user_group`
+ * `icinga_user_template`
+ * `icinga_user`
+ * `icinga_zone`
+
+2. A module to deploy changes in the director and a corresponding info-module.
+
+3. A [role](roles/ansible_icinga/) to change objects in Icinga 2 using the the provided modules.
+
+4. An [inventory plugin](plugins/inventory) to use hosts and groups defined in Icinga as a dynamic inventory.
+
+Required Ansible version: 2.9.10
+
+## Installation
+
+If you use Ansible >=3.0.0, this collection is included in Ansible.
+
+If you use an older version, you can install it with Ansible Galaxy:
+
+```
+ansible-galaxy collection install t_systems_mms.icinga_director
+```
+
+Alternatively put the collection into a `requirements.yml`-file:
+
+```
+---
+collections:
+- t_systems_mms.icinga_director
+```
+
+## Documentation
+
+Our modules include documentation.
+
+You can find the complete documentation for the modules in the [docs-folder](docs) or in the [Ansible documentation](<https://docs.ansible.com/ansible/latest/collections/t_systems_mms/icinga_director/index.html#plugins-in-t-systems-mms-icinga-director>).
+
+To display it on the command-line you can use the `ansible-doc` command.
+
+For example, to see the documentation for the module `icinga_host` run the following command on the cli:
+
+```
+ansible-doc t_systems_mms.icinga_director.icinga_host
+```
+
+To see the documentation for the inventory plugin, run:
+
+```
+ansible-doc -t inventory t_systems_mms.icinga_director.icinga_director_inventory
+```
+
+## Examples using the modules
+
+See the `examples` directory for a complete list of examples.
+
+```
+- hosts: localhost
+ collections:
+ - t_systems_mms.icinga_director
+ tasks:
+ - name: create a host in icinga
+ t_systems_mms.icinga_director.icinga_host:
+ state: present
+ url: "https://example.com"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "{{ ansible_hostname }}"
+ address: "{{ ansible_default_ipv4.address }}"
+ display_name: "{{ ansible_hostname }}"
+ groups:
+ - "foo"
+ imports:
+ - "StandardServer"
+ vars:
+ dnscheck: "no"
+```
+
+```
+- name: Query a service apply rule in icinga
+ t_systems_mms.icinga_director.icinga_service_apply_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "SERVICE_dummy"
+ register: result
+```
+
+## Examples using the role
+
+Please see the [README](roles/ansible_icinga/README.md) of the role.
+
+## Examples using the inventory plugin
+
+Create a file that ends with `icinga_director_inventory.yaml`, for example `inventory.icinga_director_inventory.yaml`.
+
+The content should look like this:
+
+```
+plugin: t_systems_mms.icinga_director.icinga_director_inventory
+url: "https://example.com"
+url_username: foo
+url_password: bar
+force_basic_auth: False
+```
+
+Then you can use the dynamic inventory like this:
+
+```
+ansible-playbook -i inventory.icinga_director_inventory.yaml path/to/your/playbook.yml
+```
+
+## Example using module defaults groups
+
+With ansible-core >= 2.12 it is possible to specify defaults parameters for all modules in this collection using [Module defaults groups](https://docs.ansible.com/ansible/latest/user_guide/playbooks_module_defaults.html#module-defaults-groups). Use it like this:
+
+```
+- hosts: localhost
+
+ module_defaults:
+ group/t_systems_mms.icinga_director.icinga:
+ url: "https://example.com"
+ url_username: foo
+ url_password: bar
+
+ tasks:
+ - name: Create host
+ t_systems_mms.icinga_director.icinga_host:
+ object_name: myhost
+ address: 172.0.0.1
+
+ - name: Create command
+ t_systems_mms.icinga_director.icinga_command:
+ object_name: my-command
+ command: my-command.sh
+```
+
+## Contributing
+
+See [Contributing](CONTRIBUTING.md).
+
+## Troubleshooting
+
+If one of the following errors is thrown, your Icinga Director is probably sitting behind a basic authentication prompt. Use `force_basic_auth: true` in your tasks to fix the problem.
+If you are using this collections' ansible role, you have to use `icinga_force_basic_auth: true` to fix this problem.
+
+```
+fatal: [localhost]: FAILED! => {"changed": false, "msg": "bad return code while creating: -1. Error message: Request failed: <urlopen error Tunnel connection failed: 302 Found>"}
+```
+
+```
+failed: [localhost] => {"ansible_loop_var": "item", "changed": false, "item": "localhost", "msg": "AbstractDigestAuthHandler does not support the following scheme: 'Negotiate'", "status": -1, "url": "https://icinga-director.example.com/director/host?name=foohost"}
+```
+
+
+## Extras
+
+* Use our code snippets template supported in Visual Studio Code
+
+Please see the [README](vsc-snippets/README.md) for more information.
+
+## License
+
+GPLv3
+
+## Author Information
+
+* Sebastian Gumprich
+* Lars Krahl
+* Michaela Mattes
+* Martin Schurz
diff --git a/ansible_collections/t_systems_mms/icinga_director/changelogs/.plugin-cache.yaml b/ansible_collections/t_systems_mms/icinga_director/changelogs/.plugin-cache.yaml
new file mode 100644
index 000000000..2aa43ea23
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/changelogs/.plugin-cache.yaml
@@ -0,0 +1,220 @@
+objects: {}
+plugins:
+ become: {}
+ cache: {}
+ callback: {}
+ cliconf: {}
+ connection: {}
+ httpapi: {}
+ inventory:
+ icinga_director_inventory:
+ description: Returns Ansible inventory from Icinga
+ name: icinga_director_inventory
+ version_added: null
+ lookup: {}
+ module:
+ icinga_command:
+ description: Manage commands in Icinga2
+ name: icinga_command
+ namespace: ''
+ version_added: 1.0.0
+ icinga_command_info:
+ description: Query commands in Icinga2
+ name: icinga_command_info
+ namespace: ''
+ version_added: 1.13.0
+ icinga_command_template:
+ description: Manage command templates in Icinga2
+ name: icinga_command_template
+ namespace: ''
+ version_added: 1.1.0
+ icinga_command_template_info:
+ description: Query command templates in Icinga2
+ name: icinga_command_template_info
+ namespace: ''
+ version_added: 1.13.0
+ icinga_deploy:
+ description: Trigger deployment in Icinga2
+ name: icinga_deploy
+ namespace: ''
+ version_added: 1.33.0
+ icinga_deploy_info:
+ description: Get deployment information through the director API
+ name: icinga_deploy_info
+ namespace: ''
+ version_added: 1.33.0
+ icinga_endpoint:
+ description: Manage endpoints in Icinga2
+ name: icinga_endpoint
+ namespace: ''
+ version_added: 1.5.0
+ icinga_endpoint_info:
+ description: Query endpoints in Icinga2
+ name: icinga_endpoint_info
+ namespace: ''
+ version_added: 1.13.0
+ icinga_host:
+ description: Manage hosts in Icinga2
+ name: icinga_host
+ namespace: ''
+ version_added: 1.0.0
+ icinga_host_info:
+ description: Query hosts in Icinga2
+ name: icinga_host_info
+ namespace: ''
+ version_added: 1.13.0
+ icinga_host_template:
+ description: Manage host templates in Icinga2
+ name: icinga_host_template
+ namespace: ''
+ version_added: 1.2.0
+ icinga_host_template_info:
+ description: Query host templates in Icinga2
+ name: icinga_host_template_info
+ namespace: ''
+ version_added: 1.13.0
+ icinga_hostgroup:
+ description: Manage hostgroups in Icinga2
+ name: icinga_hostgroup
+ namespace: ''
+ version_added: 1.0.0
+ icinga_hostgroup_info:
+ description: Query hostgroups in Icinga2
+ name: icinga_hostgroup_info
+ namespace: ''
+ version_added: 1.13.0
+ icinga_notification:
+ description: Manage notifications in Icinga2
+ name: icinga_notification
+ namespace: ''
+ version_added: 1.0.0
+ icinga_notification_info:
+ description: Query notifications in Icinga2
+ name: icinga_notification_info
+ namespace: ''
+ version_added: 1.13.0
+ icinga_notification_template:
+ description: Manage notification templates in Icinga2
+ name: icinga_notification_template
+ namespace: ''
+ version_added: 1.9.0
+ icinga_notification_template_info:
+ description: Query notification templates in Icinga2
+ name: icinga_notification_template_info
+ namespace: ''
+ version_added: 1.13.0
+ icinga_scheduled_downtime:
+ description: Manage downtimes in Icinga2
+ name: icinga_scheduled_downtime
+ namespace: ''
+ version_added: 1.25.0
+ icinga_service:
+ description: Manage services in Icinga2
+ name: icinga_service
+ namespace: ''
+ version_added: 1.0.0
+ icinga_service_apply:
+ description: Manage service apply rules in Icinga2
+ name: icinga_service_apply
+ namespace: ''
+ version_added: 1.0.0
+ icinga_service_apply_info:
+ description: Query service apply rules in Icinga2
+ name: icinga_service_apply_info
+ namespace: ''
+ version_added: 1.13.0
+ icinga_service_info:
+ description: Query services in Icinga2
+ name: icinga_service_info
+ namespace: ''
+ version_added: 1.13.0
+ icinga_service_template:
+ description: Manage service templates in Icinga2
+ name: icinga_service_template
+ namespace: ''
+ version_added: 1.0.0
+ icinga_service_template_info:
+ description: Query service templates in Icinga2
+ name: icinga_service_template_info
+ namespace: ''
+ version_added: 1.13.0
+ icinga_servicegroup:
+ description: Manage servicegroups in Icinga2
+ name: icinga_servicegroup
+ namespace: ''
+ version_added: 1.0.0
+ icinga_servicegroup_info:
+ description: Query servicegroups in Icinga2
+ name: icinga_servicegroup_info
+ namespace: ''
+ version_added: 1.13.0
+ icinga_serviceset:
+ description: Manage servicesets in Icinga2
+ name: icinga_serviceset
+ namespace: ''
+ version_added: 1.29.0
+ icinga_timeperiod:
+ description: Manage timeperiods in Icinga2
+ name: icinga_timeperiod
+ namespace: ''
+ version_added: 1.0.0
+ icinga_timeperiod_info:
+ description: Query timeperiods in Icinga2
+ name: icinga_timeperiod_info
+ namespace: ''
+ version_added: 1.13.0
+ icinga_timeperiod_template:
+ description: Manage timeperiod templates in Icinga2
+ name: icinga_timeperiod_template
+ namespace: ''
+ version_added: 1.17.0
+ icinga_timeperiod_template_info:
+ description: Query timeperiod templates in Icinga2
+ name: icinga_timeperiod_template_info
+ namespace: ''
+ version_added: 1.17.0
+ icinga_user:
+ description: Manage users in Icinga2
+ name: icinga_user
+ namespace: ''
+ version_added: 1.0.0
+ icinga_user_group:
+ description: Manage users groups in Icinga2
+ name: icinga_user_group
+ namespace: ''
+ version_added: 1.16.0
+ icinga_user_group_info:
+ description: Query user groups in Icinga2
+ name: icinga_user_group_info
+ namespace: ''
+ version_added: 1.16.0
+ icinga_user_info:
+ description: Query users in Icinga2
+ name: icinga_user_info
+ namespace: ''
+ version_added: 1.13.0
+ icinga_user_template:
+ description: Manage user templates in Icinga2
+ name: icinga_user_template
+ namespace: ''
+ version_added: 1.0.0
+ icinga_user_template_info:
+ description: Query user templates in Icinga2
+ name: icinga_user_template_info
+ namespace: ''
+ version_added: 1.13.0
+ icinga_zone:
+ description: Manage zones in Icinga2
+ name: icinga_zone
+ namespace: ''
+ version_added: 1.5.0
+ icinga_zone_info:
+ description: Query zones in Icinga2
+ name: icinga_zone_info
+ namespace: ''
+ version_added: 1.13.0
+ netconf: {}
+ shell: {}
+ strategy: {}
+ vars: {}
+version: 1.33.1
diff --git a/ansible_collections/t_systems_mms/icinga_director/changelogs/changelog.yaml b/ansible_collections/t_systems_mms/icinga_director/changelogs/changelog.yaml
new file mode 100644
index 000000000..2e181b959
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/changelogs/changelog.yaml
@@ -0,0 +1,256 @@
+---
+ancestor:
+releases:
+ 1.18.1:
+ changes:
+ trivial:
+ - add changelogs config so antsibull-changelog can work (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/124)
+ - use antsichaut and release-drafter for changelog and release generation
+ (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/122)
+ release_date: '2021-06-28'
+ 1.19.0:
+ changes:
+ minor_changes:
+ - add notification_template to role (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/125)
+ trivial:
+ - add Inventory plugin (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/127)
+ - add changelogs config so antsibull-changelog can work (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/124)
+ - ignore changelogs directory created by a 3rd party tool (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/126)
+ - use antsichaut and release-drafter for changelog and release generation
+ (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/122)
+ release_date: '2021-06-28'
+ 1.20.0:
+ changes:
+ minor_changes:
+ - Add some more documentation on command template (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/128)
+ - add "vars" variable to icinga_notification in the role (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/129)
+ release_date: '2021-07-16'
+ 1.20.1:
+ changes:
+ trivial:
+ - Docs and tests update (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/131)
+ release_date: '2021-08-05'
+ 1.21.0:
+ changes:
+ minor_changes:
+ - Add event_command parameter to icinga_service_apply module (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/132)
+ - Add event_command parameter to service apply playbook to enable usage (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/133)
+ trivial:
+ - Docs and tests update (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/131)
+ release_date: '2021-08-16'
+ 1.21.1:
+ changes:
+ bugfixes:
+ - Changed place in the creation order of service object in ansible_icinga
+ role (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/135)
+ release_date: '2021-08-30'
+ 1.21.2:
+ changes:
+ trivial:
+ - 'Draft: updated retry pull request (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/139)'
+ - added 3 retries for every playbook (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/138)
+ release_date: '2021-09-13'
+ 1.22.0:
+ changes:
+ minor_changes:
+ - Add support for retry_interval and max_check_attempts to host template (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/140)
+ trivial:
+ - 'Draft: updated retry pull request (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/139)'
+ - added 3 retries for every playbook (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/138)
+ release_date: '2021-09-15'
+ 1.22.1:
+ changes:
+ trivial:
+ - added missing parameter to notification task (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/141)
+ - ansible-test needs python >= 3.8 at the controller (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/142)
+ release_date: '2021-09-17'
+ 1.23.0:
+ release_date: '2021-09-23'
+ 1.23.1:
+ changes:
+ minor_changes:
+ - add resolve option to inventory-plugin (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/147)
+ trivial:
+ - add documentation files and creation-workflow to repo (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/144)
+ - improve autogenerated documentation (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/145)
+ release_date: '2021-10-18'
+ 1.25.0:
+ changes:
+ bugfixes:
+ - added a fix for the new scheduled_downtime module (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/150)
+ minor_changes:
+ - Add Icinga scheduled downtime module (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/146)
+ release_date: '2021-11-22'
+ 1.25.1:
+ changes:
+ trivial:
+ - added duration into our scheduled_downtime task (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/151)
+ - fix call url function (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/154)
+ release_date: '2021-11-24'
+ 1.26.0:
+ changes:
+ minor_changes:
+ - add option to append arguments to all modules (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/153)
+ trivial:
+ - added duration into our scheduled_downtime task (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/151)
+ - fix call url function (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/154)
+ release_date: '2021-12-03'
+ 1.27.0:
+ changes:
+ minor_changes:
+ - Add possibility to use Compose and keyed groups in inventory-module (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/155)
+ release_date: '2022-01-03'
+ 1.27.1:
+ changes:
+ trivial:
+ - fixed missing property 'display_name' in module 'icinga_service' (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/157)
+ release_date: '2022-02-15'
+ 1.27.2:
+ changes:
+ trivial:
+ - Fix sanity tests (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/159)
+ release_date: '2022-03-19'
+ 1.28.0:
+ changes:
+ bugfixes:
+ - 'role: add check_command to icinga_service_apply (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/161)'
+ minor_changes:
+ - Added missing fields to 'icinga_host' and 'icinga_host_template' (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/158)
+ trivial:
+ - Fix sanity tests (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/159)
+ release_date: '2022-03-28'
+ 1.28.1:
+ changes:
+ minor_changes:
+ - Test more ansible versions (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/162)
+ trivial:
+ - Configure Renovate (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/164)
+ - 'chore(deps): update actions/checkout action (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/168)'
+ - 'chore(deps): update actions/setup-python action to v3 (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/169)'
+ - 'chore(deps): update codecov/codecov-action action to v3 (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/170)'
+ - 'chore(deps): update github-actions-x/commit action to v2.9 (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/166)'
+ release_date: '2022-03-30'
+ 1.29.0:
+ changes:
+ minor_changes:
+ - Add icinga_serviceset module (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/163)
+ - Test more ansible versions (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/162)
+ trivial:
+ - Configure Renovate (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/164)
+ - 'chore(deps): update actions/checkout action (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/168)'
+ - 'chore(deps): update actions/setup-python action to v3 (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/169)'
+ - 'chore(deps): update codecov/codecov-action action to v3 (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/170)'
+ - 'chore(deps): update github-actions-x/commit action to v2.9 (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/166)'
+ modules:
+ - description: Manage servicesets in Icinga2
+ name: icinga_serviceset
+ namespace: ''
+ release_date: '2022-04-20'
+ 1.29.1:
+ changes:
+ trivial:
+ - 'chore(deps): update actions/checkout action to v3.0.2 (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/171)'
+ - 'chore(deps): update actions/setup-python action to v4 (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/173)'
+ - 'chore(deps): update github/codeql-action action to v2 (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/172)'
+ - fix release workflow (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/174)
+ release_date: '2022-04-21'
+ 1.30.0:
+ changes:
+ minor_changes:
+ - Add action_group to enable module default groups (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/175)
+ trivial:
+ - 'chore(deps): update actions/checkout action to v3.0.2 (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/171)'
+ - 'chore(deps): update actions/setup-python action to v4 (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/173)'
+ - 'chore(deps): update github/codeql-action action to v2 (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/172)'
+ - fix release workflow (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/174)
+ release_date: '2022-06-16'
+ 1.30.1:
+ changes:
+ bugfixes:
+ - Add exception handling to diff and exist functions (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/176)
+ trivial:
+ - update list of ansible and python versions to be tested (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/178)
+ - update python-version for ansible-lint in tests (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/177)
+ release_date: '2022-07-01'
+ 1.30.2:
+ release_date: '2022-08-02'
+ 1.31.0:
+ changes:
+ minor_changes:
+ - Add flapping support to service template module (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/180)
+ - Add icon support to service template (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/179)
+ release_date: '2022-08-22'
+ 1.31.1:
+ changes:
+ trivial:
+ - Update actions/checkout action to v3.1.0 (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/184)
+ - Update ansible-community/ansible-test-gh-action action to v1.10.0 (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/182)
+ - Update ansible-community/ansible-test-gh-action action to v1.11.0 (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/185)
+ - Update ansible-community/ansible-test-gh-action action to v1.11.1 (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/186)
+ - add ansible 2.14 to test-matrix, use new gh-action for tests (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/181)
+ - add empty default to argument docs (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/188)
+ - fix problems found by refurb (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/183)
+ release_date: '2022-08-22'
+ 1.31.2:
+ release_date: '2022-11-04'
+ 1.31.3:
+ release_date: '2022-11-04'
+ 1.31.4:
+ release_date: '2022-11-04'
+ 1.31.5:
+ changes:
+ trivial:
+ - Update actions/checkout action to v3.2.0 (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/194)
+ - Update ansible-community/ansible-test-gh-action action to v1.12.0 (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/192)
+ - Update ansible-test to latest collection template. (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/195)
+ - add galaxy.yml to yamllinting (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/191)
+ release_date: '2022-11-15'
+ 1.32.0:
+ changes:
+ minor_changes:
+ - Add zone to user and notification template (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/198)
+ trivial:
+ - Update actions/checkout action to v3.2.0 (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/194)
+ - Update ansible-community/ansible-test-gh-action action to v1.12.0 (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/192)
+ - Update ansible-test to latest collection template. (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/195)
+ - add galaxy.yml to yamllinting (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/191)
+ release_date: '2023-01-06'
+ 1.32.1:
+ changes:
+ trivial:
+ - Consider true/false in docs for boolean (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/203)
+ - immediately return values and update dict-updates (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/199)
+ release_date: '2023-01-20'
+ 1.32.2:
+ changes:
+ trivial:
+ - lowercase some more bools (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/204)
+ release_date: '2023-03-07'
+ 1.32.3:
+ changes:
+ trivial:
+ - Update actions/checkout action to v3.5.0 (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/206)
+ - use codespell to improve spelling (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/207)
+ release_date: '2023-03-09'
+ 1.33.0:
+ changes:
+ minor_changes:
+ - Add Icinga Deploy handler and module (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/205)
+ trivial:
+ - Update actions/checkout action to v3.5.0 (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/206)
+ - use codespell to improve spelling (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/207)
+ modules:
+ - description: Trigger deployment in Icinga2
+ name: icinga_deploy
+ namespace: ''
+ - description: Get deployment information through the director API
+ name: icinga_deploy_info
+ namespace: ''
+ release_date: '2023-05-22'
+ 1.33.1:
+ changes:
+ bugfixes:
+ - add icinga_deploy_* to action_group and test it (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/214)
+ trivial:
+ - Update README (https://github.com/T-Systems-MMS/ansible-collection-icinga-director/pull/211)
+ release_date: '2023-05-22'
diff --git a/ansible_collections/t_systems_mms/icinga_director/changelogs/config.yaml b/ansible_collections/t_systems_mms/icinga_director/changelogs/config.yaml
new file mode 100644
index 000000000..bbf52fc2b
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/changelogs/config.yaml
@@ -0,0 +1,33 @@
+---
+changelog_filename_template: ../CHANGELOG.rst
+changelog_filename_version_depth: 0
+changes_file: changelog.yaml
+changes_format: combined
+ignore_other_fragment_extensions: true
+keep_fragments: false
+mention_ancestor: true
+new_plugins_after_name: removed_features
+notesdir: fragments
+prelude_section_name: release_summary
+prelude_section_title: Release Summary
+sanitize_changelog: true
+sections:
+ - - major_changes
+ - Major Changes
+ - - minor_changes
+ - Minor Changes
+ - - breaking_changes
+ - Breaking Changes / Porting Guide
+ - - deprecated_features
+ - Deprecated Features
+ - - removed_features
+ - Removed Features (previously deprecated)
+ - - security_fixes
+ - Security Fixes
+ - - bugfixes
+ - Bugfixes
+ - - known_issues
+ - Known Issues
+title: T_Systems_Mms.Icinga_Director
+trivial_section_name: trivial
+use_fqcn: true
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/.gitkeep b/ansible_collections/t_systems_mms/icinga_director/docs/.gitkeep
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/.gitkeep
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_command.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_command.rst
new file mode 100644
index 000000000..8a954b79e
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_command.rst
@@ -0,0 +1,277 @@
+.. _icinga_command_module:
+
+
+icinga_command -- Manage commands in Icinga2
+============================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Add or remove a command to Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ state (optional, str, present)
+ Apply feature state.
+
+
+ command (optional, str, None)
+ The command Icinga should run. Required when state is ``present``.
+
+ Absolute paths are accepted as provided, relative paths are prefixed with "PluginDir + ", similar Constant prefixes are allowed.
+
+ Spaces will lead to separation of command path and standalone arguments.
+
+ Please note that this means that we do not support spaces in plugin names and paths right now.
+
+
+ methods_execute (optional, str, PluginCheck)
+ Plugin Check commands are what you need when running checks against your infrastructure.
+
+ Notification commands will be used when it comes to notify your users.
+
+ Event commands allow you to trigger specific actions when problems occur.
+
+ Some people use them for auto-healing mechanisms, like restarting services or rebooting systems at specific thresholds.
+
+
+ disabled (optional, bool, False)
+ Disabled objects will not be deployed.
+
+
+ object_name (True, str, None)
+ Name of the command.
+
+
+ imports (optional, list, [])
+ Importable templates, add as many as you want. Please note that order matters when importing properties from multiple templates - last one wins.
+
+
+ timeout (optional, str, None)
+ Optional command timeout. Allowed values are seconds or durations postfixed with a specific unit (for example 1m or also 3m 30s).
+
+
+ zone (optional, str, None)
+ Icinga cluster zone. Allows to manually override Directors decisions of where to deploy your config to.
+
+ You should consider not doing so unless you gained deep understanding of how an Icinga Cluster stack works.
+
+
+ vars (optional, dict, {})
+ Custom properties of the command.
+
+
+ arguments (optional, dict, None)
+ Arguments of the command.
+
+ Each argument can take either a string, a json or a dict
+
+ When using a dict as argument value, the following properties are supported. ``skip_key``, ``repeat_key``, ``required``, ``order``, ``description``), ``set_if``, ``value``.
+
+ The ``value`` property can be either a string, a json or a dict. When used as a dict, you can define its ``type`` as ``Function`` and set its ``body`` property as an Icinga DSL piece of config.
+
+
+ append (optional, bool, None)
+ Do not overwrite the whole object but instead append the defined properties.
+
+ Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+
+ Note - Variables that are set by default will also be applied, even if not set.
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+Notes
+-----
+
+.. note::
+ - This module supports check mode.
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Create command
+ t_systems_mms.icinga_director.icinga_command:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ arguments:
+ '--authpassphrase':
+ value: $snmpv3_priv_key$
+ '--authprotocol':
+ value: $snmpv3_auth_protocol$
+ '--critical':
+ value: $centreon_critical$
+ '--filter':
+ value: $centreon_filter$
+ '--hostname':
+ value: $snmp_address$
+ '--maxrepetitions':
+ value: $centreon_maxrepetitions$
+ '--mode':
+ value: $centreon_mode$
+ '--plugin':
+ value: $centreon_plugin$
+ '--privpassphrase':
+ value: $snmpv3_auth_key$
+ '--privprotocol':
+ value: $snmpv3_priv_protocol$
+ '--snmp-community':
+ value: $snmp_community$
+ '--snmp-timeout':
+ value: $snmp_timeout$
+ '--snmp-username':
+ value: $snmpv3_user$
+ '--snmp-version':
+ value: $snmp_version$
+ '--subsetleef':
+ value: $centreon_subsetleef$
+ '--verbose':
+ set_if: $centreon_verbose$
+ '--warning':
+ value: $centreon_warning$
+ '--dummy-arg':
+ description: "dummy arg using Icinga DSL code"
+ value:
+ type: "Function"
+ body: 'return macro("$dummy_var$")'
+ command: "/opt/centreon-plugins/centreon_plugins.pl"
+ command_type: "PluginCheck"
+ disabled: false
+ object_name: centreon-plugins
+ imports:
+ - centreon-plugins-template
+ vars:
+ centreon_maxrepetitions: 20
+ centreon_subsetleef: 20
+ centreon_verbose: false
+ snmp_address: $address$
+ snmp_timeout: 60
+ snmp_version: '2'
+ snmpv3_auth_key: authkey
+ snmpv3_priv_key: privkey
+ snmpv3_user: user
+
+ - name: Update command
+ t_systems_mms.icinga_director.icinga_command:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: centreon-plugins
+ timeout: "1m"
+ append: true
+
+ - name: Create event command
+ t_systems_mms.icinga_director.icinga_command:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ command: "/opt/scripts/restart_httpd"
+ object_name: "restart_httpd"
+ command_type: "PluginEvent"
+ arguments:
+ '-s':
+ value: $service.state$
+ '-t':
+ value: $service.state_type$
+ '-a':
+ set_if: $service.check_attempt$
+ value: $restart_service$
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Sebastian Gumprich (@rndmh3ro)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_command_info.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_command_info.rst
new file mode 100644
index 000000000..aca1339b7
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_command_info.rst
@@ -0,0 +1,155 @@
+.. _icinga_command_info_module:
+
+
+icinga_command_info -- Query commands in Icinga2
+================================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Get a list of command objects from Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ query (False, str, )
+ Text to filter search results.
+
+ The text is matched on object_name.
+
+ Only objects containing this text will be returned in the resultset.
+
+ Requires Icinga Director 1.8.0+, in earlier versions this parameter is ignored and all objects are returned.
+
+
+ resolved (optional, bool, False)
+ Resolve all inherited object properties and omit templates in output.
+
+
+ external (optional, bool, False)
+ Also include external objects in output.
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+Notes
+-----
+
+.. note::
+ - This module supports check mode.
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Query a command in icinga
+ t_systems_mms.icinga_director.icinga_command_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "centreon-plugins"
+
+
+
+Return Values
+-------------
+
+objects (always, list, )
+ A list of returned Director objects.
+
+ The list contains all objects matching the query filter.
+
+ If the filter does not match any object, the list will be empty.
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Martin Schurz (@schurzi)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_command_template.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_command_template.rst
new file mode 100644
index 000000000..a821adb79
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_command_template.rst
@@ -0,0 +1,257 @@
+.. _icinga_command_template_module:
+
+
+icinga_command_template -- Manage command templates in Icinga2
+==============================================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Add or remove a command template to Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ state (optional, str, present)
+ Apply feature state.
+
+
+ command (optional, str, None)
+ The command Icinga should run.
+
+ Absolute paths are accepted as provided, relative paths are prefixed with "PluginDir + ", similar Constant prefixes are allowed.
+
+ Spaces will lead to separation of command path and standalone arguments.
+
+ Please note that this means that we do not support spaces in plugin names and paths right now.
+
+
+ methods_execute (optional, str, PluginCheck)
+ Plugin Check commands are what you need when running checks against your infrastructure.
+
+ Notification commands will be used when it comes to notify your users.
+
+ Event commands allow you to trigger specific actions when problems occur.
+
+ Some people use them for auto-healing mechanisms, like restarting services or rebooting systems at specific thresholds.
+
+
+ disabled (optional, bool, False)
+ Disabled objects will not be deployed.
+
+
+ object_name (True, str, None)
+ Name of the command template.
+
+
+ imports (optional, list, [])
+ Importable templates, add as many as you want. Please note that order matters when importing properties from multiple templates - last one wins.
+
+
+ timeout (optional, str, None)
+ Optional command timeout. Allowed values are seconds or durations postfixed with a specific unit (for example 1m or also 3m 30s).
+
+
+ zone (optional, str, None)
+ Icinga cluster zone. Allows to manually override Directors decisions of where to deploy your config to.
+
+ You should consider not doing so unless you gained deep understanding of how an Icinga Cluster stack works.
+
+
+ vars (optional, dict, {})
+ Custom properties of the command template.
+
+
+ arguments (optional, dict, None)
+ Arguments of the command template.
+
+ Each argument can take either a string, a json or a dict
+
+ When using a dict as argument value, the following properties are supported. ``skip_key``, ``repeat_key``, ``required``, ``order``, ``description``), ``set_if``, ``value``.
+
+ The ``value`` property can be either a string, a json or a dict. When used as a dict, you can define its ``type`` as ``Function`` and set its ``body`` property as an Icinga DSL piece of config.
+
+
+ append (optional, bool, None)
+ Do not overwrite the whole object but instead append the defined properties.
+
+ Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+
+ Note - Variables that are set by default will also be applied, even if not set.
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+Notes
+-----
+
+.. note::
+ - This module supports check mode.
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Create command template
+ t_systems_mms.icinga_director.icinga_command_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ arguments:
+ '--authpassphrase':
+ value: $snmpv3_priv_key$
+ '--authprotocol':
+ value: $snmpv3_auth_protocol$
+ '--critical':
+ value: $centreon_critical$
+ '--filter':
+ value: $centreon_filter$
+ '--hostname':
+ value: $snmp_address$
+ '--maxrepetitions':
+ value: $centreon_maxrepetitions$
+ '--mode':
+ value: $centreon_mode$
+ '--plugin':
+ value: $centreon_plugin$
+ '--privpassphrase':
+ value: $snmpv3_auth_key$
+ '--privprotocol':
+ value: $snmpv3_priv_protocol$
+ '--snmp-community':
+ value: $snmp_community$
+ '--snmp-timeout':
+ value: $snmp_timeout$
+ '--snmp-username':
+ value: $snmpv3_user$
+ '--snmp-version':
+ value: $snmp_version$
+ '--subsetleef':
+ value: $centreon_subsetleef$
+ '--verbose':
+ set_if: $centreon_verbose$
+ '--warning':
+ value: $centreon_warning$
+ '--dummy-arg':
+ description: "dummy arg using Icinga DSL code"
+ value:
+ type: "Function"
+ body: 'return macro("$dummy_var$")'
+ command: "/opt/centreon-plugins/centreon_plugins.pl"
+ command_type: "PluginCheck"
+ object_name: centreon-plugins-template
+ disabled: false
+ vars:
+ centreon_maxrepetitions: 20
+ centreon_subsetleef: 20
+ centreon_verbose: false
+ snmp_address: $address$
+ snmp_timeout: 60
+ snmp_version: '2'
+ snmpv3_auth_key: authkey
+ snmpv3_priv_key: privkey
+ snmpv3_user: user
+
+ - name: Update command template
+ t_systems_mms.icinga_director.icinga_command_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: centreon-plugins-template
+ timeout: "2m"
+ append: true
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Lars Krahl (@mmslkr)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_command_template_info.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_command_template_info.rst
new file mode 100644
index 000000000..528806e29
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_command_template_info.rst
@@ -0,0 +1,151 @@
+.. _icinga_command_template_info_module:
+
+
+icinga_command_template_info -- Query command templates in Icinga2
+==================================================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Get a list of command template objects from Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ query (False, str, )
+ Text to filter search results.
+
+ The text is matched on object_name.
+
+ Only objects containing this text will be returned in the resultset.
+
+ Requires Icinga Director 1.8.0+, in earlier versions this parameter is ignored and all objects are returned.
+
+
+ resolved (optional, bool, False)
+ Resolve all inherited object properties and omit templates in output.
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+Notes
+-----
+
+.. note::
+ - This module supports check mode.
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Query a command template in icinga
+ t_systems_mms.icinga_director.icinga_command_template_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "centreon-plugins-template"
+
+
+
+Return Values
+-------------
+
+objects (always, list, )
+ A list of returned Director objects.
+
+ The list contains all objects matching the query filter.
+
+ If the filter does not match any object, the list will be empty.
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Martin Schurz (@schurzi)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_deploy.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_deploy.rst
new file mode 100644
index 000000000..a9032a9fb
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_deploy.rst
@@ -0,0 +1,127 @@
+.. _icinga_deploy_module:
+
+
+icinga_deploy -- Trigger deployment in Icinga2
+==============================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Trigger a deployment to Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Deploy the icinga config
+ t_systems_mms.icinga_director.icinga_deploy:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+
+
+
+Return Values
+-------------
+
+checksum (always, str, {'checksum': '294bdfb53c4da471e37317beed549a953c939424'})
+ Checksum of the configuration that should be rolled out
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Falk Händler (@flkhndlr)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_deploy_info.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_deploy_info.rst
new file mode 100644
index 000000000..4563f956a
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_deploy_info.rst
@@ -0,0 +1,147 @@
+.. _icinga_deploy_info_module:
+
+
+icinga_deploy_info -- Get deployment information through the director API
+=========================================================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Get deployment information through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ configs (optional, list, None)
+ A list of checksums of configs to query information for
+
+
+ activities (optional, list, None)
+ A list of checksums of activities to query information for
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Query the current deployment info in icinga
+ t_systems_mms.icinga_director.icinga_deploy_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+
+
+
+Return Values
+-------------
+
+active_configuration (if active configuration exists, dict, {'active_configuration': {'activity': '3557598829f2a2fc4acc7b565fb54bae24754c67', 'config': '299d9d49e03435c6de562c4b22a26e63990d30a9', 'stage_name': '902cb282-e702-43ce-bb3c-962f850a1694'}})
+ Checksums of the active configuration
+
+ Contains current activity checksum, config checksum
+
+ and a checksum for the stage_name
+
+
+configs (only if requested, list, {'configs': {'b175ca0562434deeb4fb1fc03fd80cd7361b56df': 'deployed', 'b175ca0562434deeb4fb1fc03fd80cd7361b56de': 'active'}})
+ Checksum of the requested config and its state
+
+
+activities (only if requested, list, {'activities': {'a4c955364bc7b77efd0323fc87d95307f827e30c': 'deployed', '3557598829f2a2fc4acc7b565fb54bae24754c67': 'active'}})
+ checksum of the requested activities and its state
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Falk Händler (@flkhndlr)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_director_inventory.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_director_inventory.rst
new file mode 100644
index 000000000..d4e2e8b9b
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_director_inventory.rst
@@ -0,0 +1,203 @@
+.. _icinga_director_inventory_module:
+
+
+icinga_director_inventory -- Returns Ansible inventory from Icinga
+==================================================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Returns Ansible inventory from Icinga
+
+
+
+
+
+
+Parameters
+----------
+
+ plugin (True, any, None)
+ Name of the plugin
+
+
+ url (True, str, None)
+ Icinga URL to connect to
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+ strict (optional, bool, False)
+ If ``yes`` make invalid entries a fatal error, otherwise skip and continue.
+
+ Since it is possible to use facts in the expressions they might not always be available and we ignore those errors by default.
+
+
+ compose (optional, dict, {})
+ Create vars from jinja2 expressions.
+
+
+ groups (optional, dict, {})
+ Add hosts to group based on Jinja2 conditionals.
+
+
+ keyed_groups (optional, list, [])
+ Add hosts to group based on the values of a variable.
+
+
+ parent_group (optional, str, None)
+ parent group for keyed group
+
+
+ prefix (optional, str, )
+ A keyed group name will start with this prefix
+
+
+ separator (optional, str, _)
+ separator used to build the keyed group name
+
+
+ key (optional, str, None)
+ The key from input dictionary used to generate groups
+
+
+ default_value (optional, str, None)
+ The default value when the host variable's value is an empty string.
+
+ This option is mutually exclusive with ``trailing_separator``.
+
+
+ trailing_separator (optional, bool, True)
+ Set this option to *False* to omit the ``separator`` after the host variable when the value is an empty string.
+
+ This option is mutually exclusive with ``default_value``.
+
+
+
+ use_extra_vars (optional, bool, False)
+ Merge extra vars into the available variables for composition (highest precedence).
+
+
+ leading_separator (optional, boolean, True)
+ Use in conjunction with keyed_groups.
+
+ By default, a keyed group that does not have a prefix or a separator provided will have a name that starts with an underscore.
+
+ This is because the default prefix is "" and the default separator is "_".
+
+ Set this option to False to omit the leading underscore (or other separator) if no prefix is given.
+
+ If the group name is derived from a mapping the separator is still used to concatenate the items.
+
+ To not use a separator in the group name at all, set the separator for the keyed group to an empty string instead.
+
+
+
+
+
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ plugin: t_systems_mms.icinga_director.icinga_director_inventory
+ url: 'https://example.com'
+ url_username: foo
+ url_password: bar
+ force_basic_auth: False
+ strict: False
+
+ # use the object_name you defined as hostname
+ compose:
+ hostname: object_name
+
+ # create a group based on the operating system defined in a custom variable
+ keyed_groups:
+ - prefix: os
+ key: vars.HostOS
+
+ # create groups based on jinja templates
+ # here we create a group called "rb" if the host variable "check_period" is "24/7"
+ groups:
+ rb: check_period == "24/7"
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Sebastian Gumprich (@rndmh3ro)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_endpoint.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_endpoint.rst
new file mode 100644
index 000000000..3be3f35bd
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_endpoint.rst
@@ -0,0 +1,178 @@
+.. _icinga_endpoint_module:
+
+
+icinga_endpoint -- Manage endpoints in Icinga2
+==============================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Add or remove an endpoint to Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ state (optional, str, present)
+ Apply feature state.
+
+
+ object_name (True, str, None)
+ Icinga object name for this endpoint.
+
+ This is usually a fully qualified host name but it could basically be any kind of string.
+
+ To make things easier for your users we strongly suggest to use meaningful names for templates.
+
+ For example "generic-endpoint" is ugly, "Standard Linux Server" is easier to understand.
+
+
+ host (optional, str, None)
+ The hostname/IP address of the remote Icinga 2 instance.
+
+
+ port (optional, int, None)
+ The service name/port of the remote Icinga 2 instance. Defaults to 5665.
+
+
+ log_duration (optional, str, None)
+ Duration for keeping replay logs on connection loss. Defaults to 1d (86400 seconds). Attribute is specified in seconds. If log_duration is set to 0, replaying logs is disabled. You could also specify the value in human readable format like 10m for 10 minutes or 1h for one hour.
+
+
+ zone (optional, str, None)
+ The name of the zone this endpoint is part of.
+
+
+ append (optional, bool, None)
+ Do not overwrite the whole object but instead append the defined properties.
+
+ Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+
+ Note - Variables that are set by default will also be applied, even if not set.
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+Notes
+-----
+
+.. note::
+ - This module supports check mode.
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Create an endpoint in icinga
+ t_systems_mms.icinga_director.icinga_endpoint:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "fooendpoint"
+ host: "127.0.0.1"
+ zone: "foozone"
+
+ - name: Update an endpoint in icinga
+ t_systems_mms.icinga_director.icinga_endpoint:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "fooendpoint"
+ host: "127.0.0.1"
+ zone: "foozone"
+ port: 5665
+ append: true
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Aaron Bulmahn (@arbu)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_endpoint_info.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_endpoint_info.rst
new file mode 100644
index 000000000..a07950f8c
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_endpoint_info.rst
@@ -0,0 +1,151 @@
+.. _icinga_endpoint_info_module:
+
+
+icinga_endpoint_info -- Query endpoints in Icinga2
+==================================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Get a list of endpoint objects from Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ query (False, str, )
+ Text to filter search results.
+
+ The text is matched on object_name.
+
+ Only objects containing this text will be returned in the resultset.
+
+ Requires Icinga Director 1.8.0+, in earlier versions this parameter is ignored and all objects are returned.
+
+
+ resolved (optional, bool, False)
+ Resolve all inherited object properties and omit templates in output.
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+Notes
+-----
+
+.. note::
+ - This module supports check mode.
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Query an endpoint in icinga
+ t_systems_mms.icinga_director.icinga_endpoint_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "fooendpoint"
+
+
+
+Return Values
+-------------
+
+objects (always, list, )
+ A list of returned Director objects.
+
+ The list contains all objects matching the query filter.
+
+ If the filter does not match any object, the list will be empty.
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Martin Schurz (@schurzi)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_host.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_host.rst
new file mode 100644
index 000000000..1ba33fb80
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_host.rst
@@ -0,0 +1,339 @@
+.. _icinga_host_module:
+
+
+icinga_host -- Manage hosts in Icinga2
+======================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Add or remove a host to Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ accept_config (optional, bool, None)
+ Whether the agent is configured to accept config.
+
+
+ address (optional, str, None)
+ Host address. Usually an IPv4 address, but may be any kind of address your check plugin is able to deal with.
+
+
+ address6 (optional, str, None)
+ Host IPv6 address. Usually an IPv6 address, but may be any kind of address your check plugin is able to deal with.
+
+
+ append (optional, bool, None)
+ Do not overwrite the whole object but instead append the defined properties.
+
+ Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+
+ Note - Variables that are set by default will also be applied, even if not set.
+
+
+ check_command (optional, str, None)
+ The name of the check command.
+
+ Though this is not required to be defined in the director, you still have to supply a check_command in a host or host-template.
+
+
+ check_interval (optional, str, None)
+ Your regular check interval.
+
+
+ check_period (optional, str, None)
+ The name of a time period which determines when this object should be monitored. Not limited by default.
+
+
+ check_timeout (optional, str, None)
+ Check command timeout in seconds. Overrides the CheckCommand's timeout attribute
+
+
+ command_endpoint (optional, str, None)
+ The endpoint where commands are executed on.
+
+
+ disabled (optional, bool, False)
+ Disabled objects will not be deployed.
+
+
+ display_name (optional, str, None)
+ Alternative name for this host. Might be a host alias or and kind of string helping your users to identify this host.
+
+
+ enable_active_checks (optional, bool, None)
+ Whether to actively check this object.
+
+
+ enable_event_handler (optional, bool, None)
+ Whether to enable event handlers this object.
+
+
+ enable_flapping (optional, bool, None)
+ Whether flap detection is enabled on this object.
+
+
+ enable_notifications (optional, bool, None)
+ Whether to send notifications for this object.
+
+
+ enable_passive_checks (optional, bool, None)
+ Whether to accept passive check results for this object.
+
+
+ enable_perfdata (optional, bool, None)
+ Whether to process performance data provided by this object.
+
+
+ event_command (optional, str, None)
+ Event command for host which gets called on every check execution if one of these conditions matches
+
+ The host is in a soft state
+
+ The host state changes into a hard state
+
+ The host state recovers from a soft or hard state to OK/Up
+
+
+ flapping_threshold_high (optional, str, None)
+ Flapping upper bound in percent for a service to be considered flapping
+
+
+ flapping_threshold_low (optional, str, None)
+ Flapping lower bound in percent for a service to be considered not flapping
+
+
+ groups (optional, list, [])
+ Hostgroups that should be directly assigned to this node. Hostgroups can be useful for various reasons.
+
+ You might assign service checks based on assigned hostgroup. They are also often used as an instrument to enforce restricted views in Icinga Web 2.
+
+ Hostgroups can be directly assigned to single hosts or to host templates.
+
+ You might also want to consider assigning hostgroups using apply rules.
+
+
+ has_agent (optional, bool, None)
+ Whether this host has the Icinga 2 Agent installed.
+
+
+ icon_image (optional, str, None)
+ An URL pointing to an icon for this object.
+
+ Try "tux.png" for icons relative to public/img/icons or "cloud" (no extension) for items from the Icinga icon font
+
+
+ icon_image_alt (optional, str, None)
+ Alternative text to be shown in case above icon is missing
+
+
+ imports (optional, list, None)
+ Choose a Host Template. Required when state is ``present``.
+
+ Required if *state* is ``present``.
+
+
+ master_should_connect (optional, bool, None)
+ Whether the parent (master) node should actively try to connect to this agent.
+
+
+ max_check_attempts (optional, str, None)
+ Defines after how many check attempts a new hard state is reached.
+
+
+ notes (optional, str, None)
+ Additional notes for this object.
+
+
+ notes_url (optional, str, None)
+ An URL pointing to additional notes for this object.
+
+ Separate multiple urls like this "'http://url1' 'http://url2'".
+
+ Maximum length is 255 characters.
+
+
+ object_name (True, str, None)
+ Icinga object name for this host.
+
+ This is usually a fully qualified host name but it could basically be any kind of string.
+
+ To make things easier for your users we strongly suggest to use meaningful names for templates.
+
+ For example "generic-host" is ugly, "Standard Linux Server" is easier to understand.
+
+
+ retry_interval (optional, str, None)
+ Retry interval, will be applied after a state change unless the next hard state is reached.
+
+
+ state (optional, str, present)
+ Apply feature state.
+
+
+ vars (optional, dict, None)
+ Custom properties of the host.
+
+
+ volatile (optional, bool, None)
+ Whether this check is volatile.
+
+
+ zone (optional, str, None)
+ Set the zone.
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+Notes
+-----
+
+.. note::
+ - This module supports check mode.
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Create a host in icinga
+ t_systems_mms.icinga_director.icinga_host:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ accept_config: true
+ address: "127.0.0.1"
+ address6: "::1"
+ check_command: hostalive
+ check_interval: 90s
+ check_timeout: 60
+ command_endpoint: fooendpoint
+ disabled: false
+ display_name: "foohost"
+ enable_active_checks: true
+ enable_event_handler: false
+ enable_flapping: false
+ enable_notifications: true
+ enable_passive_checks: false
+ enable_perfdata: false
+ flapping_threshold_high: "30.0"
+ flapping_threshold_low: "25.0"
+ has_agent: true
+ icon_image_alt: "alt text"
+ icon_image: "http://url1"
+ master_should_connect: true
+ max_check_attempts: 3
+ object_name: "foohost"
+ retry_interval: "1m"
+ volatile: false
+ groups:
+ - "foohostgroup"
+ imports:
+ - "foohosttemplate"
+ vars:
+ dnscheck: "no"
+
+ - name: update a host in icinga
+ t_systems_mms.icinga_director.icinga_host:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "foohost"
+ notes: "example note"
+ notes_url: "'http://url1' 'http://url2'"
+ append: true
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Sebastian Gumprich (@rndmh3ro)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_host_info.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_host_info.rst
new file mode 100644
index 000000000..9198f6dd9
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_host_info.rst
@@ -0,0 +1,151 @@
+.. _icinga_host_info_module:
+
+
+icinga_host_info -- Query hosts in Icinga2
+==========================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Get a list of host objects from Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ query (False, str, )
+ Text to filter search results.
+
+ The text is matched on object_name.
+
+ Only objects containing this text will be returned in the resultset.
+
+ Requires Icinga Director 1.8.0+, in earlier versions this parameter is ignored and all objects are returned.
+
+
+ resolved (optional, bool, False)
+ Resolve all inherited object properties and omit templates in output.
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+Notes
+-----
+
+.. note::
+ - This module supports check mode.
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Query a host in icinga
+ t_systems_mms.icinga_director.icinga_host_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "foohost"
+
+
+
+Return Values
+-------------
+
+objects (always, list, )
+ A list of returned Director objects.
+
+ The list contains all objects matching the query filter.
+
+ If the filter does not match any object, the list will be empty.
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Martin Schurz (@schurzi)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_host_template.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_host_template.rst
new file mode 100644
index 000000000..a2bedaabd
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_host_template.rst
@@ -0,0 +1,335 @@
+.. _icinga_host_template_module:
+
+
+icinga_host_template -- Manage host templates in Icinga2
+========================================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Add or remove a host template to Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ accept_config (optional, bool, None)
+ Whether the agent is configured to accept config.
+
+
+ address (optional, str, None)
+ Host address. Usually an IPv4 address, but may be any kind of address your check plugin is able to deal with.
+
+
+ address6 (optional, str, None)
+ Host IPv6 address. Usually an IPv6 address, but may be any kind of address your check plugin is able to deal with.
+
+
+ append (optional, bool, None)
+ Do not overwrite the whole object but instead append the defined properties.
+
+ Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+
+ Note - Variables that are set by default will also be applied, even if not set.
+
+
+ check_command (optional, str, None)
+ The name of the check command.
+
+ Though this is not required to be defined in the director, you still have to supply a check_command in a host or host-template.
+
+
+ check_interval (optional, str, None)
+ Your regular check interval.
+
+
+ check_period (optional, str, None)
+ The name of a time period which determines when this object should be monitored. Not limited by default.
+
+
+ check_timeout (optional, str, None)
+ Check command timeout in seconds. Overrides the CheckCommand's timeout attribute
+
+
+ command_endpoint (optional, str, None)
+ The endpoint where commands are executed on.
+
+
+ disabled (optional, bool, False)
+ Disabled objects will not be deployed.
+
+
+ display_name (optional, str, None)
+ Alternative name for this host. Might be a host alias or and kind of string helping your users to identify this host.
+
+
+ enable_active_checks (optional, bool, None)
+ Whether to actively check this object.
+
+
+ enable_event_handler (optional, bool, None)
+ Whether to enable event handlers this object.
+
+
+ enable_flapping (optional, bool, None)
+ Whether flap detection is enabled on this object.
+
+
+ enable_notifications (optional, bool, None)
+ Whether to send notifications for this object.
+
+
+ enable_passive_checks (optional, bool, None)
+ Whether to accept passive check results for this object.
+
+
+ enable_perfdata (optional, bool, None)
+ Whether to process performance data provided by this object.
+
+
+ event_command (optional, str, None)
+ Event command for host which gets called on every check execution if one of these conditions matches
+
+ The host is in a soft state
+
+ The host state changes into a hard state
+
+ The host state recovers from a soft or hard state to OK/Up
+
+
+ flapping_threshold_high (optional, str, None)
+ Flapping upper bound in percent for a service to be considered flapping
+
+
+ flapping_threshold_low (optional, str, None)
+ Flapping lower bound in percent for a service to be considered not flapping
+
+
+ groups (optional, list, [])
+ Hostgroups that should be directly assigned to this node. Hostgroups can be useful for various reasons.
+
+ You might assign service checks based on assigned hostgroup. They are also often used as an instrument to enforce restricted views in Icinga Web 2.
+
+ Hostgroups can be directly assigned to single hosts or to host templates.
+
+ You might also want to consider assigning hostgroups using apply rules.
+
+
+ has_agent (optional, bool, None)
+ Whether this host has the Icinga 2 Agent installed.
+
+
+ icon_image (optional, str, None)
+ An URL pointing to an icon for this object.
+
+ Try "tux.png" for icons relative to public/img/icons or "cloud" (no extension) for items from the Icinga icon font
+
+
+ icon_image_alt (optional, str, None)
+ Alternative text to be shown in case above icon is missing
+
+
+ imports (optional, list, None)
+ Choose a host-template.
+
+
+ master_should_connect (optional, bool, None)
+ Whether the parent (master) node should actively try to connect to this agent.
+
+
+ max_check_attempts (optional, str, None)
+ Defines after how many check attempts a new hard state is reached.
+
+
+ notes (optional, str, None)
+ Additional notes for this object.
+
+
+ notes_url (optional, str, None)
+ An URL pointing to additional notes for this object.
+
+ Separate multiple urls like this "'http://url1' 'http://url2'".
+
+ Maximum length is 255 characters.
+
+
+ object_name (True, str, None)
+ Icinga object name for this host template.
+
+ This is usually a fully qualified host name but it could basically be any kind of string.
+
+ To make things easier for your users we strongly suggest to use meaningful names for templates.
+
+ For example "generic-host" is ugly, "Standard Linux Server" is easier to understand.
+
+
+ retry_interval (optional, str, None)
+ Retry interval, will be applied after a state change unless the next hard state is reached.
+
+
+ state (optional, str, present)
+ Apply feature state.
+
+
+ vars (optional, dict, None)
+ Custom properties of the host.
+
+
+ volatile (optional, bool, None)
+ Whether this check is volatile.
+
+
+ zone (optional, str, None)
+ Set the zone.
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+Notes
+-----
+
+.. note::
+ - This module supports check mode.
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Create host template
+ t_systems_mms.icinga_director.icinga_host_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ accept_config: true
+ check_command: hostalive
+ check_interval: 90s
+ check_timeout: 60
+ command_endpoint: fooendpoint
+ disabled: false
+ display_name: foohosttemplate
+ enable_active_checks: true
+ enable_event_handler: false
+ enable_flapping: false
+ enable_notifications: true
+ enable_passive_checks: false
+ enable_perfdata: false
+ flapping_threshold_high: "30.0"
+ flapping_threshold_low: "25.0"
+ has_agent: true
+ icon_image_alt: "alt text"
+ icon_image: "http://url1"
+ master_should_connect: true
+ max_check_attempts: 3
+ object_name: foohosttemplate
+ retry_interval: "1m"
+ volatile: false
+ groups:
+ - "foohostgroup"
+ imports:
+ - ''
+ vars:
+ dnscheck: "no"
+
+ - name: Update host template
+ t_systems_mms.icinga_director.icinga_host_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: foohosttemplate
+ notes: "example note"
+ notes_url: "'http://url1' 'http://url2'"
+ append: true
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Michaela Mattes (@michaelamattes)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_host_template_info.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_host_template_info.rst
new file mode 100644
index 000000000..c9679bdbe
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_host_template_info.rst
@@ -0,0 +1,151 @@
+.. _icinga_host_template_info_module:
+
+
+icinga_host_template_info -- Query host templates in Icinga2
+============================================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Get a list of host template objects from Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ query (False, str, )
+ Text to filter search results.
+
+ The text is matched on object_name.
+
+ Only objects containing this text will be returned in the resultset.
+
+ Requires Icinga Director 1.8.0+, in earlier versions this parameter is ignored and all objects are returned.
+
+
+ resolved (optional, bool, False)
+ Resolve all inherited object properties and omit templates in output.
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+Notes
+-----
+
+.. note::
+ - This module supports check mode.
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Query a host template in icinga
+ t_systems_mms.icinga_director.icinga_host_template_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "foohosttemplate"
+
+
+
+Return Values
+-------------
+
+objects (always, list, )
+ A list of returned Director objects.
+
+ The list contains all objects matching the query filter.
+
+ If the filter does not match any object, the list will be empty.
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Martin Schurz (@schurzi)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_hostgroup.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_hostgroup.rst
new file mode 100644
index 000000000..0ec3d5869
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_hostgroup.rst
@@ -0,0 +1,165 @@
+.. _icinga_hostgroup_module:
+
+
+icinga_hostgroup -- Manage hostgroups in Icinga2
+================================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Add or remove a hostgroup to Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ state (optional, str, present)
+ Apply feature state.
+
+
+ object_name (True, str, None)
+ Icinga object name for this hostgroup.
+
+
+ display_name (optional, str, None)
+ An alternative display name for this group.
+
+ If you wonder how this could be helpful just leave it blank.
+
+
+ assign_filter (optional, str, None)
+ This allows you to configure an assignment filter.
+
+ Please feel free to combine as many nested operators as you want.
+
+
+ append (optional, bool, None)
+ Do not overwrite the whole object but instead append the defined properties.
+
+ Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+
+ Note - Variables that are set by default will also be applied, even if not set.
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+Notes
+-----
+
+.. note::
+ - This module supports check mode.
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Create hostgroup
+ t_systems_mms.icinga_director.icinga_hostgroup:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: foohostgroup
+ display_name: foohostgroup
+
+ - name: Update hostgroup
+ t_systems_mms.icinga_director.icinga_hostgroup:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: foohostgroup
+ assign_filter: 'host.name="foohost"'
+ append: true
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Sebastian Gumprich (@rndmh3ro)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_hostgroup_info.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_hostgroup_info.rst
new file mode 100644
index 000000000..fb777a76f
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_hostgroup_info.rst
@@ -0,0 +1,151 @@
+.. _icinga_hostgroup_info_module:
+
+
+icinga_hostgroup_info -- Query hostgroups in Icinga2
+====================================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Get a list of hostgroup objects from Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ query (False, str, )
+ Text to filter search results.
+
+ The text is matched on object_name.
+
+ Only objects containing this text will be returned in the resultset.
+
+ Requires Icinga Director 1.8.0+, in earlier versions this parameter is ignored and all objects are returned.
+
+
+ resolved (optional, bool, False)
+ Resolve all inherited object properties and omit templates in output.
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+Notes
+-----
+
+.. note::
+ - This module supports check mode.
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Query a hostgroup in icinga
+ t_systems_mms.icinga_director.icinga_hostgroup_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "foohostgroup"
+
+
+
+Return Values
+-------------
+
+objects (always, list, )
+ A list of returned Director objects.
+
+ The list contains all objects matching the query filter.
+
+ If the filter does not match any object, the list will be empty.
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Martin Schurz (@schurzi)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_notification.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_notification.rst
new file mode 100644
index 000000000..0a8ff56fd
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_notification.rst
@@ -0,0 +1,236 @@
+.. _icinga_notification_module:
+
+
+icinga_notification -- Manage notifications in Icinga2
+======================================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Add or remove a notification to Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ state (optional, str, present)
+ Apply feature state.
+
+
+ object_name (True, str, None)
+ Name of the notification.
+
+
+ notification_interval (optional, str, None)
+ The notification interval (in seconds). This interval is used for active notifications.
+
+ Defaults to 30 minutes. If set to 0, re-notifications are disabled.
+
+
+ types (optional, list, None)
+ The state transition types you want to get notifications for.
+
+
+ users (optional, list, None)
+ Users that should be notified by this notification.
+
+
+ states (optional, list, None)
+ The host or service states you want to get notifications for.
+
+
+ apply_to (optional, str, None)
+ Whether this notification should affect hosts or services.
+
+ Required if *state* is ``present``.
+
+
+ assign_filter (optional, str, None)
+ The filter where the notification will take effect.
+
+
+ imports (optional, list, None)
+ Importable templates, add as many as you want. Required when state is ``present``.
+
+ Please note that order matters when importing properties from multiple templates - last one wins.
+
+ Required if *state* is ``present``.
+
+
+ disabled (optional, bool, False)
+ Disabled objects will not be deployed.
+
+
+ vars (optional, dict, {})
+ Custom properties of the notification.
+
+
+ period (optional, str, None)
+ The name of a time period which determines when this notification should be triggered.
+
+
+ times_begin (optional, int, None)
+ First notification delay.
+
+ Delay unless the first notification should be sent.
+
+
+ times_end (optional, int, None)
+ Last notification.
+
+ When the last notification should be sent.
+
+
+ user_groups (optional, list, None)
+ User Groups that should be notified by this notification.
+
+
+ append (optional, bool, None)
+ Do not overwrite the whole object but instead append the defined properties.
+
+ Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+
+ Note - Variables that are set by default will also be applied, even if not set.
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+Notes
+-----
+
+.. note::
+ - This module supports check mode.
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Create notification
+ t_systems_mms.icinga_director.icinga_notification:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ apply_to: host
+ assign_filter: 'host.name="foohost"'
+ imports:
+ - foonotificationtemplate
+ notification_interval: '0'
+ object_name: E-Mail_host
+ states:
+ - Up
+ - Down
+ types:
+ - Problem
+ - Recovery
+ users:
+ - rb
+ user_groups:
+ - OnCall
+ disabled: false
+ time_period: "24/7"
+ times_begin: 20
+ times_end: 120
+
+ - name: Update notification
+ t_systems_mms.icinga_director.icinga_notification:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: E-Mail_host
+ vars:
+ foo: bar
+ append: true
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Sebastian Gumprich (@rndmh3ro) / Sebastian Gruber (sgruber94)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_notification_info.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_notification_info.rst
new file mode 100644
index 000000000..ded138381
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_notification_info.rst
@@ -0,0 +1,151 @@
+.. _icinga_notification_info_module:
+
+
+icinga_notification_info -- Query notifications in Icinga2
+==========================================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Get a list of notification objects from Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ query (False, str, )
+ Text to filter search results.
+
+ The text is matched on object_name.
+
+ Only objects containing this text will be returned in the resultset.
+
+ Requires Icinga Director 1.8.0+, in earlier versions this parameter is ignored and all objects are returned.
+
+
+ resolved (optional, bool, False)
+ Resolve all inherited object properties and omit templates in output.
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+Notes
+-----
+
+.. note::
+ - This module supports check mode.
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Query a notification in icinga
+ t_systems_mms.icinga_director.icinga_notification_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "E-Mail_host"
+
+
+
+Return Values
+-------------
+
+objects (always, list, )
+ A list of returned Director objects.
+
+ The list contains all objects matching the query filter.
+
+ If the filter does not match any object, the list will be empty.
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Martin Schurz (@schurzi)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_notification_template.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_notification_template.rst
new file mode 100644
index 000000000..64baad93b
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_notification_template.rst
@@ -0,0 +1,213 @@
+.. _icinga_notification_template_module:
+
+
+icinga_notification_template -- Manage notification templates in Icinga2
+========================================================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Add or remove a notification template to Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ state (optional, str, present)
+ Apply feature state.
+
+
+ object_name (True, str, None)
+ Name of the notification template.
+
+
+ notification_interval (optional, str, None)
+ The notification interval (in seconds). This interval is used for active notifications.
+
+ Defaults to 30 minutes. If set to 0, re-notifications are disabled.
+
+
+ types (optional, list, None)
+ The state transition types you want to get notifications for.
+
+
+ states (optional, list, None)
+ The host or service states you want to get notifications for.
+
+
+ times_begin (optional, int, None)
+ First notification delay.
+
+ Delay unless the first notification should be sent.
+
+
+ times_end (optional, int, None)
+ Last notification.
+
+ When the last notification should be sent.
+
+
+ zone (optional, str, None)
+ Set the zone.
+
+
+ period (optional, str, None)
+ The name of a time period which determines when this notification should be triggered.
+
+
+ command (optional, str, None)
+ Check command definition
+
+
+ users (optional, list, None)
+ Users that should be notified by this notification
+
+
+ user_groups (optional, list, None)
+ User Groups that should be notified by this notification.
+
+
+ append (optional, bool, None)
+ Do not overwrite the whole object but instead append the defined properties.
+
+ Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+
+ Note - Variables that are set by default will also be applied, even if not set.
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+Notes
+-----
+
+.. note::
+ - This module supports check mode.
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Create notification template
+ t_systems_mms.icinga_director.icinga_notification_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: foonotificationtemplate
+ states:
+ - Up
+ - Down
+ types:
+ - Problem
+ - Recovery
+ times_begin: 20
+ times_end: 120
+ time_period: "24/7"
+ notification_command: "mail-host-notification"
+ users:
+ - "rb"
+ user_groups:
+ - "OnCall"
+ zone: "foozone"
+
+ - name: Update notification template
+ t_systems_mms.icinga_director.icinga_notification_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: foonotificationtemplate
+ notification_interval: '0'
+ append: true
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Sebastian Gumprich (@rndmh3ro) / Sebastian Gruber (sgruber94)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_notification_template_info.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_notification_template_info.rst
new file mode 100644
index 000000000..1f3efa619
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_notification_template_info.rst
@@ -0,0 +1,151 @@
+.. _icinga_notification_template_info_module:
+
+
+icinga_notification_template_info -- Query notification templates in Icinga2
+============================================================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Get a list of notification template objects from Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ query (False, str, )
+ Text to filter search results.
+
+ The text is matched on object_name.
+
+ Only objects containing this text will be returned in the resultset.
+
+ Requires Icinga Director 1.8.0+, in earlier versions this parameter is ignored and all objects are returned.
+
+
+ resolved (optional, bool, False)
+ Resolve all inherited object properties and omit templates in output.
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+Notes
+-----
+
+.. note::
+ - This module supports check mode.
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Query a notification template in icinga
+ t_systems_mms.icinga_director.icinga_notification_template_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "foonotificationtemplate"
+
+
+
+Return Values
+-------------
+
+objects (always, list, )
+ A list of returned Director objects.
+
+ The list contains all objects matching the query filter.
+
+ If the filter does not match any object, the list will be empty.
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Martin Schurz (@schurzi)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_scheduled_downtime.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_scheduled_downtime.rst
new file mode 100644
index 000000000..cda80b87b
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_scheduled_downtime.rst
@@ -0,0 +1,226 @@
+.. _icinga_scheduled_downtime_module:
+
+
+icinga_scheduled_downtime -- Manage downtimes in Icinga2
+========================================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Add or remove a downtime to Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ state (optional, str, present)
+ Apply feature state.
+
+
+ object_name (True, str, None)
+ Icinga object name for this downtime.
+
+
+ disabled (optional, bool, False)
+ Disabled objects will not be deployed.
+
+
+ author (optional, str, None)
+ Name of the downtime author.
+
+ Required if *state* is ``present``.
+
+
+ comment (optional, str, None)
+ A descriptive comment for the downtime.
+
+ Required if *state* is ``present``.
+
+
+ fixed (optional, bool, False)
+ Whether this downtime is fixed or flexible. If unsure please check the related documentation https://icinga.com/docs/icinga2/latest/doc/08-advanced-topics/#downtimes
+
+ Required if *state* is ``present``.
+
+
+ with_services (optional, bool, True)
+ Whether you only downtime the hosts or add some services with it.
+
+
+ ranges (optional, dict, {})
+ The period which should be downtimed
+
+
+ apply_to (optional, str, None)
+ Whether this dependency should affect hosts or services
+
+ Required if *state* is ``present``.
+
+
+ assign_filter (optional, str, None)
+ The filter where the downtime will take effect.
+
+
+ duration (optional, str, None)
+ How long the downtime lasts. Only has an effect for flexible (non-fixed) downtimes. Time in seconds, supported suffixes include ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). To express "90 minutes" you might want to write 1h 30m
+
+
+ append (optional, bool, None)
+ Do not overwrite the whole object but instead append the defined properties.
+
+ Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+
+ Note - Variables that are set by default will also be applied, even if not set.
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+Notes
+-----
+
+.. note::
+ - This module supports check mode.
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: create icinga_scheduled_downtime
+ t_systems_mms.icinga_director.icinga_scheduled_downtime:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ disabled: false
+ object_name: "foodowntime"
+ state: present
+ author: testuser
+ comment: test
+ fixed: true
+ with_services: true
+ apply_to: host
+ assign_filter: 'host.name="foohost"'
+ duration: 500
+ ranges:
+ "tuesday": "00:00-24:00"
+
+ - name: create icinga_scheduled_downtime2
+ t_systems_mms.icinga_director.icinga_scheduled_downtime:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ disabled: false
+ object_name: "foodowntime2"
+ state: present
+ author: testuser
+ comment: test
+ fixed: false
+ with_services: false
+ apply_to: host
+ assign_filter: 'host.name="foohost"'
+ duration: 500
+ ranges:
+ "tuesday": "00:00-24:00"
+
+ - name: update icinga_scheduled_downtime2
+ t_systems_mms.icinga_director.icinga_scheduled_downtime:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "foodowntime2"
+ state: present
+ duration: 1000
+ append: true
+ apply_to: host
+ with_services: false
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Daniel Uhlmann (@xFuture603)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_service.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_service.rst
new file mode 100644
index 000000000..c7f273bfb
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_service.rst
@@ -0,0 +1,278 @@
+.. _icinga_service_module:
+
+
+icinga_service -- Manage services in Icinga2
+============================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Add or remove a service to Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ state (optional, str, present)
+ Apply feature state.
+
+
+ object_name (True, str, None)
+ Name of the service.
+
+
+ check_command (optional, str, None)
+ Check command definition.
+
+
+ check_interval (optional, str, None)
+ Your regular check interval.
+
+
+ check_period (optional, str, None)
+ The name of a time period which determines when this object should be monitored. Not limited by default.
+
+
+ check_timeout (optional, str, None)
+ Check command timeout in seconds. Overrides the CheckCommand's timeout attribute.
+
+
+ display_name (optional, str, None)
+ Alternative name for this service.
+
+
+ enable_active_checks (optional, bool, None)
+ Whether to actively check this object.
+
+
+ enable_event_handler (optional, bool, None)
+ Whether to enable event handlers this object.
+
+
+ enable_notifications (optional, bool, None)
+ Whether to send notifications for this object.
+
+
+ enable_passive_checks (optional, bool, None)
+ Whether to accept passive check results for this object.
+
+
+ enable_perfdata (optional, bool, None)
+ Whether to process performance data provided by this object.
+
+
+ groups (optional, list, [])
+ Service groups that should be directly assigned to this service.
+
+ Servicegroups can be useful for various reasons.
+
+ They are helpful to provided service-type specific view in Icinga Web 2, either for custom dashboards or as an instrument to enforce restrictions.
+
+ Service groups can be directly assigned to single services or to service templates.
+
+
+ host (False, str, None)
+ Choose the host this single service should be assigned to.
+
+ This field will be required when `service_set` is not defined.
+
+
+ imports (optional, list, [])
+ Importable templates, add as many as you want.
+
+ Please note that order matters when importing properties from multiple templates - last one wins.
+
+
+ max_check_attempts (optional, str, None)
+ Defines after how many check attempts a new hard state is reached.
+
+
+ notes (optional, str, None)
+ Additional notes for this object.
+
+
+ notes_url (optional, str, None)
+ An URL pointing to additional notes for this object.
+
+ Separate multiple urls like this "'http://url1' 'http://url2'".
+
+ Maximum length is 255 characters.
+
+
+ retry_interval (optional, str, None)
+ Retry interval, will be applied after a state change unless the next hard state is reached.
+
+
+ use_agent (optional, bool, None)
+ Whether the check command for this service should be executed on the Icinga agent.
+
+
+ vars (optional, dict, {})
+ Custom properties of the service.
+
+
+ volatile (optional, bool, None)
+ Whether this check is volatile.
+
+
+ disabled (optional, bool, False)
+ Disabled objects will not be deployed.
+
+
+ append (optional, bool, None)
+ Do not overwrite the whole object but instead append the defined properties.
+
+ Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+
+ Note - Variables that are set by default will also be applied, even if not set.
+
+
+ service_set (optional, str, None)
+ Choose the service set name this single service should be assigned to.
+
+ This field will be required when `host` is not defined.
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+Notes
+-----
+
+.. note::
+ - This module supports check mode.
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Create service
+ tags: service
+ t_systems_mms.icinga_director.icinga_service:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "foo service"
+ display_name: "foo service"
+ check_command: hostalive
+ use_agent: false
+ host: foohost
+ vars:
+ procs_argument: consul
+ procs_critical: '1:'
+ procs_warning: '1:'
+
+ - name: Update service
+ tags: service
+ t_systems_mms.icinga_director.icinga_service:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "foo service"
+ display_name: "foo service"
+ host: foohost
+ notes: "example note"
+ notes_url: "'http://url1' 'http://url2'"
+ append: true
+
+ - name: Create serviceset service
+ t_systems_mms.icinga_director.icinga_service:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "foo service serviceset"
+ service_set: "foo_serviceset"
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Sebastian Gumprich (@rndmh3ro)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_service_apply.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_service_apply.rst
new file mode 100644
index 000000000..d2c338d8f
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_service_apply.rst
@@ -0,0 +1,308 @@
+.. _icinga_service_apply_module:
+
+
+icinga_service_apply -- Manage service apply rules in Icinga2
+=============================================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Add or remove a service apply rule to Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ state (optional, str, present)
+ Apply feature state.
+
+
+ object_name (True, str, None)
+ Name for the Icinga service apply rule.
+
+
+ display_name (optional, str, None)
+ Alternative displayed name of the service apply rule.
+
+
+ check_command (optional, str, None)
+ Check command definition.
+
+
+ check_interval (False, str, None)
+ Your regular check interval.
+
+
+ check_period (False, str, None)
+ The name of a time period which determines when this object should be monitored. Not limited by default.
+
+
+ check_timeout (False, str, None)
+ Check command timeout in seconds. Overrides the CheckCommand's timeout attribute.
+
+
+ enable_active_checks (False, bool, None)
+ Whether to actively check this object.
+
+
+ enable_event_handler (False, bool, None)
+ Whether to enable event handlers this object.
+
+
+ enable_notifications (False, bool, None)
+ Whether to send notifications for this object.
+
+
+ enable_passive_checks (False, bool, None)
+ Whether to accept passive check results for this object.
+
+
+ enable_perfdata (False, bool, None)
+ Whether to process performance data provided by this object.
+
+
+ event_command (False, str, None)
+ Event command for service which gets called on every check execution if one of these conditions matches
+
+ The service is in a soft state
+
+ The service state changes into a hard state
+
+ The service state recovers from a soft or hard state to OK/Up
+
+
+ max_check_attempts (False, str, None)
+ Defines after how many check attempts a new hard state is reached.
+
+
+ retry_interval (False, str, None)
+ Retry interval, will be applied after a state change unless the next hard state is reached.
+
+
+ groups (optional, list, [])
+ Service groups that should be directly assigned to this service.
+
+ Servicegroups can be useful for various reasons.
+
+ They are helpful to provided service-type specific view in Icinga Web 2, either for custom dashboards or as an instrument to enforce restrictions.
+
+ Service groups can be directly assigned to single services or to service templates.
+
+
+ apply_for (optional, str, None)
+ Evaluates the apply for rule for all objects with the custom attribute specified.
+
+ For example selecting "host.vars.custom_attr" will generate "for (config in host.vars.array_var)" where "config" will be accessible through "$config$".
+
+ Note - only custom variables of type "Array" are eligible.
+
+
+ assign_filter (optional, str, None)
+ The filter where the service apply rule will take effect.
+
+
+ command_endpoint (optional, str, None)
+ The host where the service should be executed on.
+
+
+ imports (optional, list, None)
+ Importable templates, add as many as you want.
+
+ Please note that order matters when importing properties from multiple templates - last one wins.
+
+
+ vars (optional, dict, {})
+ Custom properties of the service apply rule.
+
+
+ notes (optional, str, None)
+ Additional notes for this object.
+
+
+ notes_url (optional, str, None)
+ An URL pointing to additional notes for this object.
+
+ Separate multiple urls like this "'http://url1' 'http://url2'".
+
+ Maximum length is 255 characters.
+
+
+ append (optional, bool, None)
+ Do not overwrite the whole object but instead append the defined properties.
+
+ Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+
+ Note - Variables that are set by default will also be applied, even if not set.
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+Notes
+-----
+
+.. note::
+ - This module supports check mode.
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Add service apply rule to icinga
+ t_systems_mms.icinga_director.icinga_service_apply:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "SERVICE_dummy"
+ assign_filter: 'host.name="foohost"'
+ check_command: hostalive
+ display_name: "dummy process"
+ check_interval: "10m"
+ check_period: "24/7"
+ check_timeout: "1m"
+ enable_active_checks: true
+ enable_event_handler: true
+ enable_notifications: true
+ enable_passive_checks: false
+ enable_perfdata: false
+ event_command: restart_httpd
+ max_check_attempts: "5"
+ retry_interval: "3m"
+ imports:
+ - fooservicetemplate
+ groups:
+ - fooservicegroup
+ vars:
+ http_address: "$address$"
+ http_port: "9080"
+ http_uri: "/ready"
+ http_string: "Ready"
+ http_expect: "Yes"
+
+ - name: Add service apply rule with command_endpoint
+ t_systems_mms.icinga_director.icinga_service_apply:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "SERVICE_dummy"
+ assign_filter: 'host.name="foohost"'
+ check_command: hostalive
+ display_name: "dummy process"
+ check_interval: "10m"
+ check_period: "24/7"
+ check_timeout: "1m"
+ enable_active_checks: true
+ enable_event_handler: true
+ enable_notifications: true
+ enable_passive_checks: false
+ event_command: restart_httpd
+ max_check_attempts: "5"
+ retry_interval: "3m"
+ command_endpoint: "fooendpoint"
+ imports:
+ - fooservicetemplate
+ groups:
+ - fooservicegroup
+
+ - name: Update service apply rule with command_endpoint
+ t_systems_mms.icinga_director.icinga_service_apply:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "SERVICE_dummy"
+ enable_perfdata: true
+ append: true
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Sebastian Gumprich (@rndmh3ro)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_service_apply_info.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_service_apply_info.rst
new file mode 100644
index 000000000..79daa2754
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_service_apply_info.rst
@@ -0,0 +1,151 @@
+.. _icinga_service_apply_info_module:
+
+
+icinga_service_apply_info -- Query service apply rules in Icinga2
+=================================================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Get a list of service apply rule objects from Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ query (False, str, )
+ Text to filter search results.
+
+ The text is matched on object_name.
+
+ Only objects containing this text will be returned in the resultset.
+
+ Requires Icinga Director 1.8.0+, in earlier versions this parameter is ignored and all objects are returned.
+
+
+ resolved (optional, bool, False)
+ Resolve all inherited object properties and omit templates in output.
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+Notes
+-----
+
+.. note::
+ - This module supports check mode.
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Query a service apply rule in icinga
+ t_systems_mms.icinga_director.icinga_service_apply_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "SERVICE_dummy"
+
+
+
+Return Values
+-------------
+
+objects (always, list, )
+ A list of returned Director objects.
+
+ The list contains all objects matching the query filter.
+
+ If the filter does not match any object, the list will be empty.
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Martin Schurz (@schurzi)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_service_info.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_service_info.rst
new file mode 100644
index 000000000..e05d296cf
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_service_info.rst
@@ -0,0 +1,151 @@
+.. _icinga_service_info_module:
+
+
+icinga_service_info -- Query services in Icinga2
+================================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Get a list of service objects from Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ query (False, str, )
+ Text to filter search results.
+
+ The text is matched on object_name.
+
+ Only objects containing this text will be returned in the resultset.
+
+ Requires Icinga Director 1.8.0+, in earlier versions this parameter is ignored and all objects are returned.
+
+
+ resolved (optional, bool, False)
+ Resolve all inherited object properties and omit templates in output.
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+Notes
+-----
+
+.. note::
+ - This module supports check mode.
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Query a service in icinga
+ t_systems_mms.icinga_director.icinga_service_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "foo service"
+
+
+
+Return Values
+-------------
+
+objects (always, list, )
+ A list of returned Director objects.
+
+ The list contains all objects matching the query filter.
+
+ If the filter does not match any object, the list will be empty.
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Martin Schurz (@schurzi)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_service_template.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_service_template.rst
new file mode 100644
index 000000000..0f6115f03
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_service_template.rst
@@ -0,0 +1,295 @@
+.. _icinga_service_template_module:
+
+
+icinga_service_template -- Manage service templates in Icinga2
+==============================================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Add or remove a service template to Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ state (optional, str, present)
+ Apply feature state.
+
+
+ object_name (True, str, None)
+ Name of the service template.
+
+
+ check_command (optional, str, None)
+ Check command definition.
+
+
+ check_interval (optional, str, None)
+ Your regular check interval.
+
+
+ check_period (optional, str, None)
+ The name of a time period which determines when this object should be monitored. Not limited by default.
+
+
+ check_timeout (optional, str, None)
+ Check command timeout in seconds. Overrides the CheckCommand's timeout attribute.
+
+
+ enable_active_checks (optional, bool, None)
+ Whether to actively check this object.
+
+
+ enable_event_handler (optional, bool, None)
+ Whether to enable event handlers this object.
+
+
+ enable_flapping (optional, bool, None)
+ Whether flap detection is enabled on this object.
+
+
+ enable_notifications (optional, bool, None)
+ Whether to send notifications for this object.
+
+
+ enable_passive_checks (optional, bool, None)
+ Whether to accept passive check results for this object.
+
+
+ enable_perfdata (optional, bool, None)
+ Whether to process performance data provided by this object.
+
+
+ event_command (optional, str, None)
+ Event command for service which gets called on every check execution if one of these conditions matches
+
+ The service is in a soft state
+
+ The service state changes into a hard state
+
+ The service state recovers from a soft or hard state to OK/Up
+
+
+ flapping_threshold_high (optional, str, None)
+ Flapping upper bound in percent for a service to be considered flapping
+
+
+ flapping_threshold_low (optional, str, None)
+ Flapping lower bound in percent for a service to be considered not flapping
+
+
+ groups (optional, list, [])
+ Service groups that should be directly assigned to this service.
+
+ Servicegroups can be useful for various reasons.
+
+ They are helpful to provided service-type specific view in Icinga Web 2, either for custom dashboards or as an instrument to enforce restrictions.
+
+ Service groups can be directly assigned to single services or to service templates.
+
+
+ icon_image (optional, str, None)
+ An URL pointing to an icon for this object.
+
+ Try "tux.png" for icons relative to public/img/icons or "cloud" (no extension) for items from the Icinga icon font
+
+
+ icon_image_alt (optional, str, None)
+ Alternative text to be shown in case above icon is missing
+
+
+ imports (optional, list, [])
+ Importable templates, add as many as you want.
+
+ Please note that order matters when importing properties from multiple templates - last one wins.
+
+
+ max_check_attempts (optional, str, None)
+ Defines after how many check attempts a new hard state is reached.
+
+
+ notes (optional, str, None)
+ Additional notes for this object.
+
+
+ notes_url (optional, str, None)
+ An URL pointing to additional notes for this object.
+
+ Separate multiple urls like this "'http://url1' 'http://url2'".
+
+ Maximum length is 255 characters.
+
+
+ retry_interval (optional, str, None)
+ Retry interval, will be applied after a state change unless the next hard state is reached.
+
+
+ use_agent (optional, bool, None)
+ Whether the check command for this service should be executed on the Icinga agent.
+
+
+ vars (optional, dict, {})
+ Custom properties of the service template.
+
+
+ volatile (optional, bool, None)
+ Whether this check is volatile.
+
+
+ disabled (optional, bool, False)
+ Disabled objects will not be deployed.
+
+
+ append (optional, bool, None)
+ Do not overwrite the whole object but instead append the defined properties.
+
+ Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+
+ Note - Variables that are set by default will also be applied, even if not set.
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+Notes
+-----
+
+.. note::
+ - This module supports check mode.
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Create servicetemplate
+ t_systems_mms.icinga_director.icinga_service_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ enable_flapping: true
+ flapping_threshold_high: "30.0"
+ flapping_threshold_low: "25.0"
+ icon_image_alt: "alt text"
+ icon_image: "http://url1"
+ object_name: fooservicetemplate
+ use_agent: false
+ vars:
+ procs_argument: consul
+ procs_critical: '1:'
+ procs_warning: '1:'
+
+ - name: Update servicetemplate
+ t_systems_mms.icinga_director.icinga_service_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: fooservicetemplate
+ notes: "example note"
+ notes_url: "'http://url1' 'http://url2'"
+ append: true
+
+ - name: Create servicetemplate with event command
+ t_systems_mms.icinga_director.icinga_service_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: apache_check_servicetemplate
+ use_agent: false
+ event_command: restart_httpd
+ notes: "example note"
+ notes_url: "'http://url1' 'http://url2'"
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Sebastian Gumprich (@rndmh3ro)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_service_template_info.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_service_template_info.rst
new file mode 100644
index 000000000..c9e9227c7
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_service_template_info.rst
@@ -0,0 +1,151 @@
+.. _icinga_service_template_info_module:
+
+
+icinga_service_template_info -- Query service templates in Icinga2
+==================================================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Get a list of service template objects from Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ query (False, str, )
+ Text to filter search results.
+
+ The text is matched on object_name.
+
+ Only objects containing this text will be returned in the resultset.
+
+ Requires Icinga Director 1.8.0+, in earlier versions this parameter is ignored and all objects are returned.
+
+
+ resolved (optional, bool, False)
+ Resolve all inherited object properties and omit templates in output.
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+Notes
+-----
+
+.. note::
+ - This module supports check mode.
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Query a service template in icinga
+ t_systems_mms.icinga_director.icinga_service_template_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "fooservicetemplate"
+
+
+
+Return Values
+-------------
+
+objects (always, list, )
+ A list of returned Director objects.
+
+ The list contains all objects matching the query filter.
+
+ If the filter does not match any object, the list will be empty.
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Martin Schurz (@schurzi)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_servicegroup.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_servicegroup.rst
new file mode 100644
index 000000000..ecd1107ae
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_servicegroup.rst
@@ -0,0 +1,165 @@
+.. _icinga_servicegroup_module:
+
+
+icinga_servicegroup -- Manage servicegroups in Icinga2
+======================================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Add or remove a servicegroup to Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ state (optional, str, present)
+ Apply feature state.
+
+
+ object_name (True, str, None)
+ Name for the Icinga servicegroup.
+
+
+ display_name (optional, str, None)
+ An alternative display name for this group.
+
+ If you wonder how this could be helpful just leave it blank.
+
+
+ assign_filter (optional, str, None)
+ This allows you to configure an assignment filter.
+
+ Please feel free to combine as many nested operators as you want.
+
+
+ append (optional, bool, None)
+ Do not overwrite the whole object but instead append the defined properties.
+
+ Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+
+ Note - Variables that are set by default will also be applied, even if not set.
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+Notes
+-----
+
+.. note::
+ - This module supports check mode.
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Create servicegroup
+ t_systems_mms.icinga_director.icinga_servicegroup:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: fooservicegroup
+ assign_filter: 'host.name="foo"'
+
+ - name: Update servicegroup
+ t_systems_mms.icinga_director.icinga_servicegroup:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: fooservicegroup
+ display_name: fooservicegroup
+ append: true
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Sebastian Gumprich (@rndmh3ro)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_servicegroup_info.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_servicegroup_info.rst
new file mode 100644
index 000000000..88f45c326
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_servicegroup_info.rst
@@ -0,0 +1,151 @@
+.. _icinga_servicegroup_info_module:
+
+
+icinga_servicegroup_info -- Query servicegroups in Icinga2
+==========================================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Get a list of servicegroup objects from Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ query (False, str, )
+ Text to filter search results.
+
+ The text is matched on object_name.
+
+ Only objects containing this text will be returned in the resultset.
+
+ Requires Icinga Director 1.8.0+, in earlier versions this parameter is ignored and all objects are returned.
+
+
+ resolved (optional, bool, False)
+ Resolve all inherited object properties and omit templates in output.
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+Notes
+-----
+
+.. note::
+ - This module supports check mode.
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Query a servicegroup in icinga
+ t_systems_mms.icinga_director.icinga_servicegroup_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "fooservicegroup"
+
+
+
+Return Values
+-------------
+
+objects (always, list, )
+ A list of returned Director objects.
+
+ The list contains all objects matching the query filter.
+
+ If the filter does not match any object, the list will be empty.
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Martin Schurz (@schurzi)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_serviceset.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_serviceset.rst
new file mode 100644
index 000000000..44eecf6d9
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_serviceset.rst
@@ -0,0 +1,164 @@
+.. _icinga_serviceset_module:
+
+
+icinga_serviceset -- Manage servicesets in Icinga2
+==================================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Add or remove a serviceset to Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ append (optional, bool, None)
+ Do not overwrite the whole object but instead append the defined properties.
+
+ Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+
+ Note - Variables that are set by default will also be applied, even if not set.
+
+
+ assign_filter (optional, str, None)
+ This allows you to configure an assignment filter.
+
+ Please feel free to combine as many nested operators as you want.
+
+
+ description (optional, str, None)
+ A meaningful description explaining your users what to expect when assigning this set of services.
+
+
+ object_name (True, str, None)
+ Icinga object name for this serviceset.
+
+
+ state (optional, str, present)
+ Apply feature state.
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+Notes
+-----
+
+.. note::
+ - This module supports check mode.
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Create serviceset
+ t_systems_mms.icinga_director.icinga_serviceset:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "foo_serviceset"
+ assign_filter: 'host.name="foohost"'
+ description: "foo description"
+
+ - name: Update serviceset
+ t_systems_mms.icinga_director.icinga_serviceset:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "foo_serviceset"
+ assign_filter: 'host.name="foohost2"'
+ append: true
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Heiko Neblung (@HeikoNeblung)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_timeperiod.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_timeperiod.rst
new file mode 100644
index 000000000..a93fa7710
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_timeperiod.rst
@@ -0,0 +1,176 @@
+.. _icinga_timeperiod_module:
+
+
+icinga_timeperiod -- Manage timeperiods in Icinga2
+==================================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Add or remove a timeperiod to Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ state (optional, str, present)
+ Apply feature state.
+
+
+ object_name (True, str, None)
+ Name of the time period.
+
+
+ display_name (optional, str, None)
+ Alternative name for this timeperiod.
+
+
+ imports (optional, list, [])
+ Importable templates, add as many as you want.
+
+ Please note that order matters when importing properties from multiple templates - last one wins.
+
+
+ ranges (optional, dict, None)
+ A dict of days and timeperiods.
+
+
+ append (optional, bool, None)
+ Do not overwrite the whole object but instead append the defined properties.
+
+ Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+
+ Note - Variables that are set by default will also be applied, even if not set.
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+Notes
+-----
+
+.. note::
+ - This module supports check mode.
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Create timeperiod
+ t_systems_mms.icinga_director.icinga_timeperiod:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: '24/7'
+ imports:
+ - "timeperiod_template"
+ ranges:
+ monday: "00:00-23:59"
+ tuesday: "00:00-23:59"
+ wednesday: "00:00-23:59"
+ thursday: "00:00-23:59"
+ friday: "00:00-23:59"
+ saturday: "00:00-23:59"
+ sunday: "00:00-23:59"
+
+ - name: Update timeperiod
+ t_systems_mms.icinga_director.icinga_timeperiod:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: '24/7'
+ display_name: '24/7'
+ append: true
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Sebastian Gumprich (@rndmh3ro)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_timeperiod_info.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_timeperiod_info.rst
new file mode 100644
index 000000000..d604a0e67
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_timeperiod_info.rst
@@ -0,0 +1,151 @@
+.. _icinga_timeperiod_info_module:
+
+
+icinga_timeperiod_info -- Query timeperiods in Icinga2
+======================================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Get a list of timeperiod objects from Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ query (False, str, )
+ Text to filter search results.
+
+ The text is matched on object_name.
+
+ Only objects containing this text will be returned in the resultset.
+
+ Requires Icinga Director 1.8.0+, in earlier versions this parameter is ignored and all objects are returned.
+
+
+ resolved (optional, bool, False)
+ Resolve all inherited object properties and omit templates in output.
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+Notes
+-----
+
+.. note::
+ - This module supports check mode.
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Query a timeperiod in icinga
+ t_systems_mms.icinga_director.icinga_timeperiod_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "24/7"
+
+
+
+Return Values
+-------------
+
+objects (always, list, )
+ A list of returned Director objects.
+
+ The list contains all objects matching the query filter.
+
+ If the filter does not match any object, the list will be empty.
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Martin Schurz (@schurzi)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_timeperiod_template.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_timeperiod_template.rst
new file mode 100644
index 000000000..596881fcd
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_timeperiod_template.rst
@@ -0,0 +1,202 @@
+.. _icinga_timeperiod_template_module:
+
+
+icinga_timeperiod_template -- Manage timeperiod templates in Icinga2
+====================================================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Add or remove a timeperiod template to Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ state (optional, str, present)
+ Apply feature state.
+
+
+ object_name (True, str, None)
+ Name of the time period.
+
+
+ display_name (optional, str, None)
+ Alternative name for this timeperiod template.
+
+
+ disabled (optional, bool, False)
+ Disabled objects will not be deployed.
+
+
+ imports (optional, list, [])
+ Importable templates, add as many as you want.
+
+ Please note that order matters when importing properties from multiple templates - last one wins.
+
+
+ includes (optional, list, [])
+ Include other time periods into this.
+
+
+ excludes (optional, list, [])
+ Exclude other time periods from this.
+
+
+ prefer_includes (optional, bool, True)
+ Whether to prefer timeperiods includes or excludes. Default to true.
+
+
+ ranges (optional, dict, None)
+ A dict of days and timeperiods.
+
+
+ zone (optional, str, None)
+ Set the zone.
+
+
+ update_method (optional, str, LegacyTimePeriod)
+ Define the update method.
+
+
+ append (optional, bool, None)
+ Do not overwrite the whole object but instead append the defined properties.
+
+ Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+
+ Note - Variables that are set by default will also be applied, even if not set.
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+Notes
+-----
+
+.. note::
+ - This module supports check mode.
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Create timeperiod template
+ t_systems_mms.icinga_director.icinga_timeperiod_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "timeperiod_template"
+ imports: []
+ disabled: false
+ prefer_includes: false
+ ranges:
+ monday: "00:00-23:59"
+ tuesday: "00:00-23:59"
+ wednesday: "00:00-23:59"
+ thursday: "00:00-23:59"
+ friday: "00:00-23:59"
+ saturday: "00:00-23:59"
+ sunday: "00:00-23:59"
+ update_method: "LegacyTimePeriod"
+
+ - name: Update timeperiod template
+ t_systems_mms.icinga_director.icinga_timeperiod_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "timeperiod_template"
+ display_name: "timeperiod template"
+ append: true
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Sebastian Gumprich (@rndmh3ro)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_timeperiod_template_info.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_timeperiod_template_info.rst
new file mode 100644
index 000000000..28066d8cc
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_timeperiod_template_info.rst
@@ -0,0 +1,151 @@
+.. _icinga_timeperiod_template_info_module:
+
+
+icinga_timeperiod_template_info -- Query timeperiod templates in Icinga2
+========================================================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Get a list of timeperiod template objects from Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ query (False, str, )
+ Text to filter search results.
+
+ The text is matched on object_name.
+
+ Only objects containing this text will be returned in the resultset.
+
+ Requires Icinga Director 1.8.0+, in earlier versions this parameter is ignored and all objects are returned.
+
+
+ resolved (optional, bool, False)
+ Resolve all inherited object properties and omit templates in output.
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+Notes
+-----
+
+.. note::
+ - This module supports check mode.
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Query a timeperiod template in icinga
+ t_systems_mms.icinga_director.icinga_timeperiod_template_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "timeperiod_template"
+
+
+
+Return Values
+-------------
+
+objects (always, list, )
+ A list of returned Director objects.
+
+ The list contains all objects matching the query filter.
+
+ If the filter does not match any object, the list will be empty.
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Sebastian Gumprich (@rndmh3ro)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_user.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_user.rst
new file mode 100644
index 000000000..8f6866e0b
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_user.rst
@@ -0,0 +1,193 @@
+.. _icinga_user_module:
+
+
+icinga_user -- Manage users in Icinga2
+======================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Add or remove a user to Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ state (optional, str, present)
+ Apply feature state.
+
+
+ object_name (True, str, None)
+ Name of the user.
+
+
+ display_name (optional, str, None)
+ Alternative name for this user.
+
+ In case your object name is a username, this could be the full name of the corresponding person.
+
+
+ imports (optional, list, None)
+ Importable templates, add as many as you want.
+
+ Please note that order matters when importing properties from multiple templates - last one wins.
+
+
+ pager (optional, str, None)
+ The pager address of the user.
+
+
+ period (optional, str, None)
+ The name of a time period which determines when notifications to this User should be triggered. Not set by default.
+
+
+ disabled (optional, bool, False)
+ Disabled objects will not be deployed.
+
+
+ email (optional, str, None)
+ The Email address of the user.
+
+
+ groups (optional, list, None)
+ User groups that should be directly assigned to this user.
+
+ Groups can be useful for various reasons. You might prefer to send notifications to groups instead of single users.
+
+
+ append (optional, bool, None)
+ Do not overwrite the whole object but instead append the defined properties.
+
+ Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+
+ Note - Variables that are set by default will also be applied, even if not set.
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+Notes
+-----
+
+.. note::
+ - This module supports check mode.
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Create user
+ t_systems_mms.icinga_director.icinga_user:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "rb"
+ pager: 'SIP/emergency'
+ period: '24/7'
+ email: "foouser@example.com"
+ imports:
+ - foousertemplate
+ groups:
+ - onCall
+
+ - name: Update user
+ t_systems_mms.icinga_director.icinga_user:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "rb"
+ display_name: "Rufbereitschaft"
+ append: true
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Sebastian Gumprich (@rndmh3ro)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_user_group.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_user_group.rst
new file mode 100644
index 000000000..3aae9db30
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_user_group.rst
@@ -0,0 +1,163 @@
+.. _icinga_user_group_module:
+
+
+icinga_user_group -- Manage users groups in Icinga2
+===================================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Add or remove a user group to Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ state (optional, str, present)
+ Apply feature state.
+
+
+ object_name (True, str, None)
+ Name of the user group.
+
+
+ display_name (optional, str, None)
+ Alternative name for this user group.
+
+ In case your object name is a username, this could be the full name of the corresponding person.
+
+
+ disabled (optional, bool, False)
+ Disabled objects will not be deployed.
+
+
+ append (optional, bool, None)
+ Do not overwrite the whole object but instead append the defined properties.
+
+ Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+
+ Note - Variables that are set by default will also be applied, even if not set.
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+Notes
+-----
+
+.. note::
+ - This module supports check mode.
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Create user group
+ t_systems_mms.icinga_director.icinga_user_group:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "onCall"
+ disabled: false
+
+ - name: Update user group
+ t_systems_mms.icinga_director.icinga_user_group:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "onCall"
+ display_name: "on call group"
+ append: true
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Sebastian Gumprich (@rndmh3ro)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_user_group_info.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_user_group_info.rst
new file mode 100644
index 000000000..20b0dbf45
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_user_group_info.rst
@@ -0,0 +1,151 @@
+.. _icinga_user_group_info_module:
+
+
+icinga_user_group_info -- Query user groups in Icinga2
+======================================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Get a list of user group objects from Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ query (False, str, )
+ Text to filter search results.
+
+ The text is matched on object_name.
+
+ Only objects containing this text will be returned in the resultset.
+
+ Requires Icinga Director 1.8.0+, in earlier versions this parameter is ignored and all objects are returned.
+
+
+ resolved (optional, bool, False)
+ Resolve all inherited object properties and omit templates in output.
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+Notes
+-----
+
+.. note::
+ - This module supports check mode.
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Query a user group in icinga
+ t_systems_mms.icinga_director.icinga_user_group_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "onCall"
+
+
+
+Return Values
+-------------
+
+objects (always, list, )
+ A list of returned Director objects.
+
+ The list contains all objects matching the query filter.
+
+ If the filter does not match any object, the list will be empty.
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Sebastian Gumprich (@rndmh3ro)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_user_info.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_user_info.rst
new file mode 100644
index 000000000..4a96a748f
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_user_info.rst
@@ -0,0 +1,151 @@
+.. _icinga_user_info_module:
+
+
+icinga_user_info -- Query users in Icinga2
+==========================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Get a list of user objects from Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ query (False, str, )
+ Text to filter search results.
+
+ The text is matched on object_name.
+
+ Only objects containing this text will be returned in the resultset.
+
+ Requires Icinga Director 1.8.0+, in earlier versions this parameter is ignored and all objects are returned.
+
+
+ resolved (optional, bool, False)
+ Resolve all inherited object properties and omit templates in output.
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+Notes
+-----
+
+.. note::
+ - This module supports check mode.
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Query a user in icinga
+ t_systems_mms.icinga_director.icinga_user_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "rb"
+
+
+
+Return Values
+-------------
+
+objects (always, list, )
+ A list of returned Director objects.
+
+ The list contains all objects matching the query filter.
+
+ If the filter does not match any object, the list will be empty.
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Martin Schurz (@schurzi)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_user_template.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_user_template.rst
new file mode 100644
index 000000000..a1cc6295c
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_user_template.rst
@@ -0,0 +1,173 @@
+.. _icinga_user_template_module:
+
+
+icinga_user_template -- Manage user templates in Icinga2
+========================================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Add or remove a user template to Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ state (optional, str, present)
+ Apply feature state.
+
+
+ object_name (True, str, None)
+ Name of the user template.
+
+
+ imports (optional, list, [])
+ Importable templates, add as many as you want.
+
+ Please note that order matters when importing properties from multiple templates - last one wins.
+
+
+ period (optional, str, None)
+ The name of a time period which determines when notifications to this User should be triggered. Not set by default.
+
+
+ enable_notifications (optional, bool, None)
+ Whether to send notifications for this user.
+
+
+ zone (optional, str, None)
+ Set the zone.
+
+
+ append (optional, bool, None)
+ Do not overwrite the whole object but instead append the defined properties.
+
+ Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+
+ Note - Variables that are set by default will also be applied, even if not set.
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+Notes
+-----
+
+.. note::
+ - This module supports check mode.
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Create user template
+ t_systems_mms.icinga_director.icinga_user_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "foousertemplate"
+ enable_notifications: false
+ period: '24/7'
+ zone: "foozone"
+
+ - name: Update user template
+ t_systems_mms.icinga_director.icinga_user_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "foousertemplate"
+ enable_notifications: true
+ append: true
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Lars Krahl (@mmslkr)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_user_template_info.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_user_template_info.rst
new file mode 100644
index 000000000..339ce9715
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_user_template_info.rst
@@ -0,0 +1,151 @@
+.. _icinga_user_template_info_module:
+
+
+icinga_user_template_info -- Query user templates in Icinga2
+============================================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Get a list of user template objects from Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ query (False, str, )
+ Text to filter search results.
+
+ The text is matched on object_name.
+
+ Only objects containing this text will be returned in the resultset.
+
+ Requires Icinga Director 1.8.0+, in earlier versions this parameter is ignored and all objects are returned.
+
+
+ resolved (optional, bool, False)
+ Resolve all inherited object properties and omit templates in output.
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+Notes
+-----
+
+.. note::
+ - This module supports check mode.
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Query a user template in icinga
+ t_systems_mms.icinga_director.icinga_user_template_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "foousertemplate"
+
+
+
+Return Values
+-------------
+
+objects (always, list, )
+ A list of returned Director objects.
+
+ The list contains all objects matching the query filter.
+
+ If the filter does not match any object, the list will be empty.
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Martin Schurz (@schurzi)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_zone.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_zone.rst
new file mode 100644
index 000000000..1b2f9624c
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_zone.rst
@@ -0,0 +1,166 @@
+.. _icinga_zone_module:
+
+
+icinga_zone -- Manage zones in Icinga2
+======================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Add or remove a zone to Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ state (optional, str, present)
+ Apply feature state.
+
+
+ object_name (True, str, None)
+ Icinga object name for this zone.
+
+ This is usually a fully qualified host name but it could basically be any kind of string.
+
+ To make things easier for your users we strongly suggest to use meaningful names for templates.
+
+ For example "generic-zone" is ugly, "Standard Linux Server" is easier to understand.
+
+
+ is_global (optional, bool, False)
+ Whether configuration files for this zone should be synced to all endpoints.
+
+
+ parent (optional, str, None)
+ The name of the parent zone.
+
+
+ append (optional, bool, None)
+ Do not overwrite the whole object but instead append the defined properties.
+
+ Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+
+ Note - Variables that are set by default will also be applied, even if not set.
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+Notes
+-----
+
+.. note::
+ - This module supports check mode.
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Create a zone in icinga
+ t_systems_mms.icinga_director.icinga_zone:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "foozone"
+
+ - name: Update a zone in icinga
+ t_systems_mms.icinga_director.icinga_zone:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "foozone"
+ parent: "master"
+ append: true
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Aaron Bulmahn (@arbu)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/docs/icinga_zone_info.rst b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_zone_info.rst
new file mode 100644
index 000000000..28d0a7e7d
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/docs/icinga_zone_info.rst
@@ -0,0 +1,155 @@
+.. _icinga_zone_info_module:
+
+
+icinga_zone_info -- Query zones in Icinga2
+==========================================
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+
+Get a list of zone objects from Icinga2 through the director API.
+
+
+
+
+
+
+Parameters
+----------
+
+ query (False, str, )
+ Text to filter search results.
+
+ The text is matched on object_name.
+
+ Only objects containing this text will be returned in the resultset.
+
+ Requires Icinga Director 1.8.0+, in earlier versions this parameter is ignored and all objects are returned.
+
+
+ resolved (optional, bool, False)
+ Resolve all inherited object properties and omit templates in output.
+
+
+ external (optional, bool, False)
+ Also include external objects in output.
+
+
+ url (True, str, None)
+ HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
+
+
+ force (optional, bool, False)
+ If ``yes`` do not get a cached copy.
+
+
+ http_agent (optional, str, ansible-httpget)
+ Header to identify as, generally appears in web server logs.
+
+
+ use_proxy (optional, bool, True)
+ If ``no``, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+
+
+ validate_certs (optional, bool, True)
+ If ``no``, SSL certificates will not be validated.
+
+ This should only be used on personally controlled sites using self-signed certificates.
+
+
+ url_username (optional, str, None)
+ The username for use in HTTP basic authentication.
+
+ This parameter can be used without *url_password* for sites that allow empty passwords
+
+
+ url_password (optional, str, None)
+ The password for use in HTTP basic authentication.
+
+ If the *url_username* parameter is not specified, the *url_password* parameter will not be used.
+
+
+ force_basic_auth (optional, bool, False)
+ Credentials specified with *url_username* and *url_password* should be passed in HTTP Header.
+
+
+ client_cert (optional, path, None)
+ PEM formatted certificate chain file to be used for SSL client authentication.
+
+ This file can also include the key as well, and if the key is included, ``client_key`` is not required.
+
+
+ client_key (optional, path, None)
+ PEM formatted file that contains your private key to be used for SSL client authentication.
+
+ If ``client_cert`` contains both the certificate and key, this option is not required.
+
+
+ use_gssapi (optional, bool, False)
+ Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
+
+ Requires the Python library `gssapi <https://github.com/pythongssapi/python-gssapi>`_ to be installed.
+
+ Credentials for GSSAPI can be specified with *url_username*/*url_password* or with the GSSAPI env var ``KRB5CCNAME`` that specified a custom Kerberos credential cache.
+
+ NTLM authentication is ``not`` supported even if the GSSAPI mech for NTLM has been installed.
+
+
+
+
+
+Notes
+-----
+
+.. note::
+ - This module supports check mode.
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml+jinja
+
+
+ - name: Query a zone in icinga
+ t_systems_mms.icinga_director.icinga_zone_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "foozone"
+
+
+
+Return Values
+-------------
+
+objects (always, list, )
+ A list of returned Director objects.
+
+ The list contains all objects matching the query filter.
+
+ If the filter does not match any object, the list will be empty.
+
+
+
+
+
+Status
+------
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Martin Schurz (@schurzi)
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_command.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_command.yml
new file mode 100644
index 000000000..d9dc9b7d6
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_command.yml
@@ -0,0 +1,89 @@
+---
+- name: Create command
+ t_systems_mms.icinga_director.icinga_command:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ arguments:
+ '--authpassphrase':
+ value: $snmpv3_priv_key$
+ '--authprotocol':
+ value: $snmpv3_auth_protocol$
+ '--critical':
+ value: $centreon_critical$
+ '--filter':
+ value: $centreon_filter$
+ '--hostname':
+ value: $snmp_address$
+ '--maxrepetitions':
+ value: $centreon_maxrepetitions$
+ '--mode':
+ value: $centreon_mode$
+ '--plugin':
+ value: $centreon_plugin$
+ '--privpassphrase':
+ value: $snmpv3_auth_key$
+ '--privprotocol':
+ value: $snmpv3_priv_protocol$
+ '--snmp-community':
+ value: $snmp_community$
+ '--snmp-timeout':
+ value: $snmp_timeout$
+ '--snmp-username':
+ value: $snmpv3_user$
+ '--snmp-version':
+ value: $snmp_version$
+ '--subsetleef':
+ value: $centreon_subsetleef$
+ '--verbose':
+ set_if: $centreon_verbose$
+ '--warning':
+ value: $centreon_warning$
+ '--dummy-arg':
+ description: "dummy arg using Icinga DSL code"
+ value:
+ type: "Function"
+ body: 'return macro("$dummy_var$")'
+ command: "/opt/centreon-plugins/centreon_plugins.pl"
+ command_type: "PluginCheck"
+ disabled: false
+ object_name: centreon-plugins
+ imports:
+ - centreon-plugins-template
+ vars:
+ centreon_maxrepetitions: 20
+ centreon_subsetleef: 20
+ centreon_verbose: false
+ snmp_address: $address$
+ snmp_timeout: 60
+ snmp_version: '2'
+ snmpv3_auth_key: authkey
+ snmpv3_priv_key: privkey
+ snmpv3_user: user
+- name: Update command
+ t_systems_mms.icinga_director.icinga_command:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: centreon-plugins
+ timeout: "1m"
+ append: true
+- name: Create event command
+ t_systems_mms.icinga_director.icinga_command:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ command: "/opt/scripts/restart_httpd"
+ object_name: "restart_httpd"
+ command_type: "PluginEvent"
+ arguments:
+ '-s':
+ value: $service.state$
+ '-t':
+ value: $service.state_type$
+ '-a':
+ set_if: $service.check_attempt$
+ value: $restart_service$
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_command_info.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_command_info.yml
new file mode 100644
index 000000000..08d1d92b0
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_command_info.yml
@@ -0,0 +1,7 @@
+---
+- name: Query a command in icinga
+ t_systems_mms.icinga_director.icinga_command_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "centreon-plugins"
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_command_template.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_command_template.yml
new file mode 100644
index 000000000..1d61032af
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_command_template.yml
@@ -0,0 +1,70 @@
+---
+- name: Create command template
+ t_systems_mms.icinga_director.icinga_command_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ arguments:
+ '--authpassphrase':
+ value: $snmpv3_priv_key$
+ '--authprotocol':
+ value: $snmpv3_auth_protocol$
+ '--critical':
+ value: $centreon_critical$
+ '--filter':
+ value: $centreon_filter$
+ '--hostname':
+ value: $snmp_address$
+ '--maxrepetitions':
+ value: $centreon_maxrepetitions$
+ '--mode':
+ value: $centreon_mode$
+ '--plugin':
+ value: $centreon_plugin$
+ '--privpassphrase':
+ value: $snmpv3_auth_key$
+ '--privprotocol':
+ value: $snmpv3_priv_protocol$
+ '--snmp-community':
+ value: $snmp_community$
+ '--snmp-timeout':
+ value: $snmp_timeout$
+ '--snmp-username':
+ value: $snmpv3_user$
+ '--snmp-version':
+ value: $snmp_version$
+ '--subsetleef':
+ value: $centreon_subsetleef$
+ '--verbose':
+ set_if: $centreon_verbose$
+ '--warning':
+ value: $centreon_warning$
+ '--dummy-arg':
+ description: "dummy arg using Icinga DSL code"
+ value:
+ type: "Function"
+ body: 'return macro("$dummy_var$")'
+ command: "/opt/centreon-plugins/centreon_plugins.pl"
+ command_type: "PluginCheck"
+ object_name: centreon-plugins-template
+ disabled: false
+ vars:
+ centreon_maxrepetitions: 20
+ centreon_subsetleef: 20
+ centreon_verbose: false
+ snmp_address: $address$
+ snmp_timeout: 60
+ snmp_version: '2'
+ snmpv3_auth_key: authkey
+ snmpv3_priv_key: privkey
+ snmpv3_user: user
+- name: Update command template
+ t_systems_mms.icinga_director.icinga_command_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: centreon-plugins-template
+ timeout: "2m"
+ append: true
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_command_template_info.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_command_template_info.yml
new file mode 100644
index 000000000..ca7bf43da
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_command_template_info.yml
@@ -0,0 +1,7 @@
+---
+- name: Query a command template in icinga
+ t_systems_mms.icinga_director.icinga_command_template_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "centreon-plugins-template"
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_deploy.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_deploy.yml
new file mode 100644
index 000000000..221f2b6cf
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_deploy.yml
@@ -0,0 +1,6 @@
+---
+- name: Deploy the icinga config
+ t_systems_mms.icinga_director.icinga_deploy:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_deploy_info.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_deploy_info.yml
new file mode 100644
index 000000000..1bee4b160
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_deploy_info.yml
@@ -0,0 +1,6 @@
+---
+- name: Query the current deployment info in icinga
+ t_systems_mms.icinga_director.icinga_deploy_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_endpoint.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_endpoint.yml
new file mode 100644
index 000000000..a05125e9e
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_endpoint.yml
@@ -0,0 +1,21 @@
+---
+- name: Create an endpoint in icinga
+ t_systems_mms.icinga_director.icinga_endpoint:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "fooendpoint"
+ host: "127.0.0.1"
+ zone: "foozone"
+- name: Update an endpoint in icinga
+ t_systems_mms.icinga_director.icinga_endpoint:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "fooendpoint"
+ host: "127.0.0.1"
+ zone: "foozone"
+ port: 5665
+ append: true
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_endpoint_info.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_endpoint_info.yml
new file mode 100644
index 000000000..c82265264
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_endpoint_info.yml
@@ -0,0 +1,7 @@
+---
+- name: Query an endpoint in icinga
+ t_systems_mms.icinga_director.icinga_endpoint_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "fooendpoint"
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_host.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_host.yml
new file mode 100644
index 000000000..84cb0eb45
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_host.yml
@@ -0,0 +1,48 @@
+---
+- name: Create a host in icinga
+ t_systems_mms.icinga_director.icinga_host:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ accept_config: true
+ address: "127.0.0.1"
+ address6: "::1"
+ check_command: hostalive
+ check_interval: 90s
+ check_timeout: 60
+ command_endpoint: fooendpoint
+ disabled: false
+ display_name: "foohost"
+ enable_active_checks: true
+ enable_event_handler: false
+ enable_flapping: false
+ enable_notifications: true
+ enable_passive_checks: false
+ enable_perfdata: false
+ flapping_threshold_high: "30.0"
+ flapping_threshold_low: "25.0"
+ has_agent: true
+ icon_image_alt: "alt text"
+ icon_image: "http://url1"
+ master_should_connect: true
+ max_check_attempts: 3
+ object_name: "foohost"
+ retry_interval: "1m"
+ volatile: false
+ groups:
+ - "foohostgroup"
+ imports:
+ - "foohosttemplate"
+ vars:
+ dnscheck: "no"
+- name: update a host in icinga
+ t_systems_mms.icinga_director.icinga_host:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "foohost"
+ notes: "example note"
+ notes_url: "'http://url1' 'http://url2'"
+ append: true
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_host_info.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_host_info.yml
new file mode 100644
index 000000000..78b748bbd
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_host_info.yml
@@ -0,0 +1,7 @@
+---
+- name: Query a host in icinga
+ t_systems_mms.icinga_director.icinga_host_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "foohost"
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_host_template.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_host_template.yml
new file mode 100644
index 000000000..ae8e87052
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_host_template.yml
@@ -0,0 +1,46 @@
+---
+- name: Create host template
+ t_systems_mms.icinga_director.icinga_host_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ accept_config: true
+ check_command: hostalive
+ check_interval: 90s
+ check_timeout: 60
+ command_endpoint: fooendpoint
+ disabled: false
+ display_name: foohosttemplate
+ enable_active_checks: true
+ enable_event_handler: false
+ enable_flapping: false
+ enable_notifications: true
+ enable_passive_checks: false
+ enable_perfdata: false
+ flapping_threshold_high: "30.0"
+ flapping_threshold_low: "25.0"
+ has_agent: true
+ icon_image_alt: "alt text"
+ icon_image: "http://url1"
+ master_should_connect: true
+ max_check_attempts: 3
+ object_name: foohosttemplate
+ retry_interval: "1m"
+ volatile: false
+ groups:
+ - "foohostgroup"
+ imports:
+ - ''
+ vars:
+ dnscheck: "no"
+- name: Update host template
+ t_systems_mms.icinga_director.icinga_host_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: foohosttemplate
+ notes: "example note"
+ notes_url: "'http://url1' 'http://url2'"
+ append: true
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_host_template_info.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_host_template_info.yml
new file mode 100644
index 000000000..26967b458
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_host_template_info.yml
@@ -0,0 +1,7 @@
+---
+- name: Query a host template in icinga
+ t_systems_mms.icinga_director.icinga_host_template_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "foohosttemplate"
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_hostgroup.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_hostgroup.yml
new file mode 100644
index 000000000..d3b0f62fc
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_hostgroup.yml
@@ -0,0 +1,18 @@
+---
+- name: Create hostgroup
+ t_systems_mms.icinga_director.icinga_hostgroup:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: foohostgroup
+ display_name: foohostgroup
+- name: Update hostgroup
+ t_systems_mms.icinga_director.icinga_hostgroup:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: foohostgroup
+ assign_filter: 'host.name="foohost"'
+ append: true
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_hostgroup_info.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_hostgroup_info.yml
new file mode 100644
index 000000000..25c17316b
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_hostgroup_info.yml
@@ -0,0 +1,7 @@
+---
+- name: Query a hostgroup in icinga
+ t_systems_mms.icinga_director.icinga_hostgroup_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "foohostgroup"
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_notification.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_notification.yml
new file mode 100644
index 000000000..8764c247e
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_notification.yml
@@ -0,0 +1,37 @@
+---
+- name: Create notification
+ t_systems_mms.icinga_director.icinga_notification:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ apply_to: host
+ assign_filter: 'host.name="foohost"'
+ imports:
+ - foonotificationtemplate
+ notification_interval: '0'
+ object_name: E-Mail_host
+ states:
+ - Up
+ - Down
+ types:
+ - Problem
+ - Recovery
+ users:
+ - rb
+ user_groups:
+ - OnCall
+ disabled: false
+ time_period: "24/7"
+ times_begin: 20
+ times_end: 120
+- name: Update notification
+ t_systems_mms.icinga_director.icinga_notification:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: E-Mail_host
+ vars:
+ foo: bar
+ append: true
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_notification_info.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_notification_info.yml
new file mode 100644
index 000000000..692d0a183
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_notification_info.yml
@@ -0,0 +1,7 @@
+---
+- name: Query a notification in icinga
+ t_systems_mms.icinga_director.icinga_notification_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "E-Mail_host"
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_notification_template.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_notification_template.yml
new file mode 100644
index 000000000..a2a53f329
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_notification_template.yml
@@ -0,0 +1,32 @@
+---
+- name: Create notification template
+ t_systems_mms.icinga_director.icinga_notification_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: foonotificationtemplate
+ states:
+ - Up
+ - Down
+ types:
+ - Problem
+ - Recovery
+ times_begin: 20
+ times_end: 120
+ time_period: "24/7"
+ notification_command: "mail-host-notification"
+ users:
+ - "rb"
+ user_groups:
+ - "OnCall"
+ zone: "foozone"
+- name: Update notification template
+ t_systems_mms.icinga_director.icinga_notification_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: foonotificationtemplate
+ notification_interval: '0'
+ append: true
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_notification_template_info.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_notification_template_info.yml
new file mode 100644
index 000000000..69a9a6d8a
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_notification_template_info.yml
@@ -0,0 +1,7 @@
+---
+- name: Query a notification template in icinga
+ t_systems_mms.icinga_director.icinga_notification_template_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "foonotificationtemplate"
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_scheduled_downtime.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_scheduled_downtime.yml
new file mode 100644
index 000000000..73da96d53
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_scheduled_downtime.yml
@@ -0,0 +1,46 @@
+---
+- name: create icinga_scheduled_downtime
+ t_systems_mms.icinga_director.icinga_scheduled_downtime:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ disabled: false
+ object_name: "foodowntime"
+ state: present
+ author: testuser
+ comment: test
+ fixed: true
+ with_services: true
+ apply_to: host
+ assign_filter: 'host.name="foohost"'
+ duration: 500
+ ranges:
+ "tuesday": "00:00-24:00"
+- name: create icinga_scheduled_downtime2
+ t_systems_mms.icinga_director.icinga_scheduled_downtime:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ disabled: false
+ object_name: "foodowntime2"
+ state: present
+ author: testuser
+ comment: test
+ fixed: false
+ with_services: false
+ apply_to: host
+ assign_filter: 'host.name="foohost"'
+ duration: 500
+ ranges:
+ "tuesday": "00:00-24:00"
+- name: update icinga_scheduled_downtime2
+ t_systems_mms.icinga_director.icinga_scheduled_downtime:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "foodowntime2"
+ state: present
+ duration: 1000
+ append: true
+ apply_to: host
+ with_services: false
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_service.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_service.yml
new file mode 100644
index 000000000..75c1e0c44
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_service.yml
@@ -0,0 +1,38 @@
+---
+- name: Create service
+ tags: service
+ t_systems_mms.icinga_director.icinga_service:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "foo service"
+ display_name: "foo service"
+ check_command: hostalive
+ use_agent: false
+ host: foohost
+ vars:
+ procs_argument: consul
+ procs_critical: '1:'
+ procs_warning: '1:'
+- name: Update service
+ tags: service
+ t_systems_mms.icinga_director.icinga_service:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "foo service"
+ display_name: "foo service"
+ host: foohost
+ notes: "example note"
+ notes_url: "'http://url1' 'http://url2'"
+ append: true
+- name: Create serviceset service
+ t_systems_mms.icinga_director.icinga_service:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "foo service serviceset"
+ service_set: "foo_serviceset"
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_service_apply.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_service_apply.yml
new file mode 100644
index 000000000..0bdd6eacb
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_service_apply.yml
@@ -0,0 +1,66 @@
+---
+- name: Add service apply rule to icinga
+ t_systems_mms.icinga_director.icinga_service_apply:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "SERVICE_dummy"
+ assign_filter: 'host.name="foohost"'
+ check_command: hostalive
+ display_name: "dummy process"
+ check_interval: "10m"
+ check_period: "24/7"
+ check_timeout: "1m"
+ enable_active_checks: true
+ enable_event_handler: true
+ enable_notifications: true
+ enable_passive_checks: false
+ enable_perfdata: false
+ event_command: restart_httpd
+ max_check_attempts: "5"
+ retry_interval: "3m"
+ imports:
+ - fooservicetemplate
+ groups:
+ - fooservicegroup
+ vars:
+ http_address: "$address$"
+ http_port: "9080"
+ http_uri: "/ready"
+ http_string: "Ready"
+ http_expect: "Yes"
+- name: Add service apply rule with command_endpoint
+ t_systems_mms.icinga_director.icinga_service_apply:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "SERVICE_dummy"
+ assign_filter: 'host.name="foohost"'
+ check_command: hostalive
+ display_name: "dummy process"
+ check_interval: "10m"
+ check_period: "24/7"
+ check_timeout: "1m"
+ enable_active_checks: true
+ enable_event_handler: true
+ enable_notifications: true
+ enable_passive_checks: false
+ event_command: restart_httpd
+ max_check_attempts: "5"
+ retry_interval: "3m"
+ command_endpoint: "fooendpoint"
+ imports:
+ - fooservicetemplate
+ groups:
+ - fooservicegroup
+- name: Update service apply rule with command_endpoint
+ t_systems_mms.icinga_director.icinga_service_apply:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "SERVICE_dummy"
+ enable_perfdata: true
+ append: true
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_service_apply_info.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_service_apply_info.yml
new file mode 100644
index 000000000..873a669ed
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_service_apply_info.yml
@@ -0,0 +1,7 @@
+---
+- name: Query a service apply rule in icinga
+ t_systems_mms.icinga_director.icinga_service_apply_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "SERVICE_dummy"
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_service_info.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_service_info.yml
new file mode 100644
index 000000000..8aef77c29
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_service_info.yml
@@ -0,0 +1,7 @@
+---
+- name: Query a service in icinga
+ t_systems_mms.icinga_director.icinga_service_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "foo service"
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_service_template.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_service_template.yml
new file mode 100644
index 000000000..ab6b6a8dd
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_service_template.yml
@@ -0,0 +1,39 @@
+---
+- name: Create servicetemplate
+ t_systems_mms.icinga_director.icinga_service_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ enable_flapping: true
+ flapping_threshold_high: "30.0"
+ flapping_threshold_low: "25.0"
+ icon_image_alt: "alt text"
+ icon_image: "http://url1"
+ object_name: fooservicetemplate
+ use_agent: false
+ vars:
+ procs_argument: consul
+ procs_critical: '1:'
+ procs_warning: '1:'
+- name: Update servicetemplate
+ t_systems_mms.icinga_director.icinga_service_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: fooservicetemplate
+ notes: "example note"
+ notes_url: "'http://url1' 'http://url2'"
+ append: true
+- name: Create servicetemplate with event command
+ t_systems_mms.icinga_director.icinga_service_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: apache_check_servicetemplate
+ use_agent: false
+ event_command: restart_httpd
+ notes: "example note"
+ notes_url: "'http://url1' 'http://url2'"
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_service_template_info.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_service_template_info.yml
new file mode 100644
index 000000000..c9ba2a28c
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_service_template_info.yml
@@ -0,0 +1,7 @@
+---
+- name: Query a service template in icinga
+ t_systems_mms.icinga_director.icinga_service_template_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "fooservicetemplate"
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_servicegroup.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_servicegroup.yml
new file mode 100644
index 000000000..e07bc2b42
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_servicegroup.yml
@@ -0,0 +1,18 @@
+---
+- name: Create servicegroup
+ t_systems_mms.icinga_director.icinga_servicegroup:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: fooservicegroup
+ assign_filter: 'host.name="foo"'
+- name: Update servicegroup
+ t_systems_mms.icinga_director.icinga_servicegroup:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: fooservicegroup
+ display_name: fooservicegroup
+ append: true
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_servicegroup_info.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_servicegroup_info.yml
new file mode 100644
index 000000000..3636dfe1f
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_servicegroup_info.yml
@@ -0,0 +1,7 @@
+---
+- name: Query a servicegroup in icinga
+ t_systems_mms.icinga_director.icinga_servicegroup_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "fooservicegroup"
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_serviceset.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_serviceset.yml
new file mode 100644
index 000000000..5fc6ef7d0
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_serviceset.yml
@@ -0,0 +1,19 @@
+---
+- name: Create serviceset
+ t_systems_mms.icinga_director.icinga_serviceset:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "foo_serviceset"
+ assign_filter: 'host.name="foohost"'
+ description: "foo description"
+- name: Update serviceset
+ t_systems_mms.icinga_director.icinga_serviceset:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "foo_serviceset"
+ assign_filter: 'host.name="foohost2"'
+ append: true
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_timeperiod.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_timeperiod.yml
new file mode 100644
index 000000000..1f7f6a675
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_timeperiod.yml
@@ -0,0 +1,27 @@
+---
+- name: Create timeperiod
+ t_systems_mms.icinga_director.icinga_timeperiod:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: '24/7'
+ imports:
+ - "timeperiod_template"
+ ranges:
+ monday: "00:00-23:59"
+ tuesday: "00:00-23:59"
+ wednesday: "00:00-23:59"
+ thursday: "00:00-23:59"
+ friday: "00:00-23:59"
+ saturday: "00:00-23:59"
+ sunday: "00:00-23:59"
+- name: Update timeperiod
+ t_systems_mms.icinga_director.icinga_timeperiod:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: '24/7'
+ display_name: '24/7'
+ append: true
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_timeperiod_info.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_timeperiod_info.yml
new file mode 100644
index 000000000..d49eee991
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_timeperiod_info.yml
@@ -0,0 +1,7 @@
+---
+- name: Query a timeperiod in icinga
+ t_systems_mms.icinga_director.icinga_timeperiod_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "24/7"
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_timeperiod_template.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_timeperiod_template.yml
new file mode 100644
index 000000000..b2def003f
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_timeperiod_template.yml
@@ -0,0 +1,29 @@
+---
+- name: Create timeperiod template
+ t_systems_mms.icinga_director.icinga_timeperiod_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "timeperiod_template"
+ imports: []
+ disabled: false
+ prefer_includes: false
+ ranges:
+ monday: "00:00-23:59"
+ tuesday: "00:00-23:59"
+ wednesday: "00:00-23:59"
+ thursday: "00:00-23:59"
+ friday: "00:00-23:59"
+ saturday: "00:00-23:59"
+ sunday: "00:00-23:59"
+ update_method: "LegacyTimePeriod"
+- name: Update timeperiod template
+ t_systems_mms.icinga_director.icinga_timeperiod_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "timeperiod_template"
+ display_name: "timeperiod template"
+ append: true
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_timeperiod_template_info.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_timeperiod_template_info.yml
new file mode 100644
index 000000000..7701d82bf
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_timeperiod_template_info.yml
@@ -0,0 +1,7 @@
+---
+- name: Query a timeperiod template in icinga
+ t_systems_mms.icinga_director.icinga_timeperiod_template_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "timeperiod_template"
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_user.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_user.yml
new file mode 100644
index 000000000..8807b16cb
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_user.yml
@@ -0,0 +1,24 @@
+---
+- name: Create user
+ t_systems_mms.icinga_director.icinga_user:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "rb"
+ pager: 'SIP/emergency'
+ period: '24/7'
+ email: "foouser@example.com"
+ imports:
+ - foousertemplate
+ groups:
+ - onCall
+- name: Update user
+ t_systems_mms.icinga_director.icinga_user:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "rb"
+ display_name: "Rufbereitschaft"
+ append: true
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_user_group.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_user_group.yml
new file mode 100644
index 000000000..8c7751798
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_user_group.yml
@@ -0,0 +1,18 @@
+---
+- name: Create user group
+ t_systems_mms.icinga_director.icinga_user_group:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "onCall"
+ disabled: false
+- name: Update user group
+ t_systems_mms.icinga_director.icinga_user_group:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "onCall"
+ display_name: "on call group"
+ append: true
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_user_group_info.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_user_group_info.yml
new file mode 100644
index 000000000..724c5587d
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_user_group_info.yml
@@ -0,0 +1,7 @@
+---
+- name: Query a user group in icinga
+ t_systems_mms.icinga_director.icinga_user_group_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "onCall"
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_user_info.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_user_info.yml
new file mode 100644
index 000000000..c3f6cffd2
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_user_info.yml
@@ -0,0 +1,7 @@
+---
+- name: Query a user in icinga
+ t_systems_mms.icinga_director.icinga_user_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "rb"
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_user_template.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_user_template.yml
new file mode 100644
index 000000000..27fd74472
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_user_template.yml
@@ -0,0 +1,20 @@
+---
+- name: Create user template
+ t_systems_mms.icinga_director.icinga_user_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "foousertemplate"
+ enable_notifications: false
+ period: '24/7'
+ zone: "foozone"
+- name: Update user template
+ t_systems_mms.icinga_director.icinga_user_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "foousertemplate"
+ enable_notifications: true
+ append: true
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_user_template_info.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_user_template_info.yml
new file mode 100644
index 000000000..cbd80e9b5
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_user_template_info.yml
@@ -0,0 +1,7 @@
+---
+- name: Query a user template in icinga
+ t_systems_mms.icinga_director.icinga_user_template_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "foousertemplate"
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_zone.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_zone.yml
new file mode 100644
index 000000000..687e8ce45
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_zone.yml
@@ -0,0 +1,17 @@
+---
+- name: Create a zone in icinga
+ t_systems_mms.icinga_director.icinga_zone:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "foozone"
+- name: Update a zone in icinga
+ t_systems_mms.icinga_director.icinga_zone:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "foozone"
+ parent: "master"
+ append: true
diff --git a/ansible_collections/t_systems_mms/icinga_director/examples/icinga_zone_info.yml b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_zone_info.yml
new file mode 100644
index 000000000..06c267788
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/examples/icinga_zone_info.yml
@@ -0,0 +1,7 @@
+---
+- name: Query a zone in icinga
+ t_systems_mms.icinga_director.icinga_zone_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "foozone"
diff --git a/ansible_collections/t_systems_mms/icinga_director/meta/runtime.yml b/ansible_collections/t_systems_mms/icinga_director/meta/runtime.yml
new file mode 100644
index 000000000..6d1ae61a8
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/meta/runtime.yml
@@ -0,0 +1,45 @@
+---
+requires_ansible: '>=2.9.10'
+
+action_groups:
+ icinga:
+ - icinga_command
+ - icinga_command_info
+ - icinga_command_template
+ - icinga_command_template_info
+ - icinga_deploy
+ - icinga_deploy_info
+ - icinga_endpoint
+ - icinga_endpoint_info
+ - icinga_host
+ - icinga_host_info
+ - icinga_host_template
+ - icinga_host_template_info
+ - icinga_hostgroup
+ - icinga_hostgroup_info
+ - icinga_notification
+ - icinga_notification_info
+ - icinga_notification_template
+ - icinga_notification_template_info
+ - icinga_scheduled_downtime
+ - icinga_service
+ - icinga_service_apply
+ - icinga_service_apply_info
+ - icinga_service_info
+ - icinga_service_template
+ - icinga_service_template_info
+ - icinga_servicegroup
+ - icinga_servicegroup_info
+ - icinga_serviceset
+ - icinga_timeperiod
+ - icinga_timeperiod_info
+ - icinga_timeperiod_template
+ - icinga_timeperiod_template_info
+ - icinga_user
+ - icinga_user_group
+ - icinga_user_group_info
+ - icinga_user_info
+ - icinga_user_template
+ - icinga_user_template_info
+ - icinga_zone
+ - icinga_zone_info
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/doc_fragments/common_options.py b/ansible_collections/t_systems_mms/icinga_director/plugins/doc_fragments/common_options.py
new file mode 100644
index 000000000..698e23bc5
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/doc_fragments/common_options.py
@@ -0,0 +1,30 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2021 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class ModuleDocFragment(object):
+ # Documentation for common options that are always the same
+ DOCUMENTATION = r"""
+ options:
+ url:
+ required: true
+ """
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/inventory/icinga_director_inventory.py b/ansible_collections/t_systems_mms/icinga_director/plugins/inventory/icinga_director_inventory.py
new file mode 100644
index 000000000..e62b15a5f
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/inventory/icinga_director_inventory.py
@@ -0,0 +1,195 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2021 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = r"""
+name: icinga_director_inventory
+short_description: Returns Ansible inventory from Icinga
+description: Returns Ansible inventory from Icinga
+author:
+- Sebastian Gumprich (@rndmh3ro)
+options:
+ plugin:
+ description: Name of the plugin
+ required: true
+ choices: ['t_systems_mms.icinga_director.icinga_director_inventory']
+ url:
+ description: Icinga URL to connect to
+ required: true
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - constructed
+"""
+
+EXAMPLES = r"""
+plugin: t_systems_mms.icinga_director.icinga_director_inventory
+url: 'https://example.com'
+url_username: foo
+url_password: bar
+force_basic_auth: False
+strict: False
+
+# use the object_name you defined as hostname
+compose:
+ hostname: object_name
+
+# create a group based on the operating system defined in a custom variable
+keyed_groups:
+ - prefix: os
+ key: vars.HostOS
+
+# create groups based on jinja templates
+# here we create a group called "rb" if the host variable "check_period" is "24/7"
+groups:
+ rb: check_period == "24/7"
+"""
+
+
+from ansible.plugins.inventory import BaseInventoryPlugin, Constructable
+
+from ansible.module_utils.urls import open_url
+import json
+
+
+class InventoryModule(BaseInventoryPlugin, Constructable):
+ NAME = "t_systems_mms.icinga_director.icinga_director_inventory"
+
+ def call_url(self, url, url_username, url_password, url_path):
+ """
+ Execute the request against the API with the provided arguments and return json.
+ """
+
+ headers = {
+ "Accept": "application/json",
+ "X-HTTP-Method-Override": "GET",
+ }
+ url = url + url_path
+ rsp = open_url(
+ url,
+ url_username=self.url_username,
+ url_password=self.url_password,
+ force_basic_auth=self.force_basic_auth,
+ headers=headers,
+ )
+ content = ""
+ if rsp:
+ content = json.loads(rsp.read().decode("utf-8"))
+ return content
+
+ def verify_file(self, path):
+ """Verify the configuration file."""
+ if super(InventoryModule, self).verify_file(path):
+ endings = (
+ "icinga_director_inventory.yaml",
+ "icinga_director_inventory.yml",
+ )
+ if any((path.endswith(ending) for ending in endings)):
+ return True
+ return False
+
+ def add_hosts_to_groups(self):
+ hostgroups = self.set_hostgroups()
+
+ for hostgroup in hostgroups:
+ members = self.call_url(
+ self.url,
+ self.url_username,
+ self.url_password,
+ url_path="/monitoring/list/hosts"
+ + "?hostgroup_name="
+ + hostgroup,
+ )
+ for member in members:
+ self.inventory.add_host(member["host_name"], group=hostgroup)
+
+ def set_hostgroups(self):
+ hostgroup_list = self.call_url(
+ self.url,
+ self.url_username,
+ self.url_password,
+ url_path="/director/hostgroups",
+ )
+
+ hostgroups = []
+
+ for hostgroup in hostgroup_list["objects"]:
+ hostgroups.append(hostgroup["object_name"])
+ self.inventory.add_group(hostgroup["object_name"])
+ return hostgroups
+
+ def parse(self, inventory, loader, path, cache=True):
+ """Return dynamic inventory from source"""
+
+ # call base method to ensure properties are available for use with other helper methods
+ super(InventoryModule, self).parse(inventory, loader, path, cache)
+
+ # Read the inventory YAML file
+ self._read_config_data(path)
+
+ # Store the options from the YAML file
+ self.plugin = self.get_option("plugin")
+ self.url = self.get_option("url")
+ self.url_username = self.get_option("url_username")
+ self.url_password = self.get_option("url_password")
+ self.force_basic_auth = self.get_option("force_basic_auth")
+ strict = self.get_option("strict")
+ compose = self.get_option("compose")
+
+ host_list = self.call_url(
+ self.url,
+ self.url_username,
+ self.url_password,
+ url_path="/director/hosts" + "?resolved",
+ )
+
+ for host in host_list["objects"]:
+ self.inventory.add_host(host["object_name"], group="all")
+ for item in host:
+ self.inventory.set_variable(
+ host["object_name"], item, host[item]
+ )
+
+ host_vars = self.inventory.get_host(host["object_name"]).get_vars()
+
+ # Add variables created by the user's Jinja2 expressions to the host
+ self._set_composite_vars(
+ compose,
+ host_vars,
+ host["object_name"],
+ strict=strict,
+ )
+
+ # The following two methods combine the provided variables dictionary with the latest host variables
+ # Using these methods after _set_composite_vars() allows groups to be created with the composed variables
+ self._add_host_to_composed_groups(
+ self.get_option("groups"),
+ host_vars,
+ host["object_name"],
+ strict=strict,
+ )
+ self._add_host_to_keyed_groups(
+ self.get_option("keyed_groups"),
+ host_vars,
+ host["object_name"],
+ strict=strict,
+ )
+
+ self.add_hosts_to_groups()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/module_utils/icinga.py b/ansible_collections/t_systems_mms/icinga_director/plugins/module_utils/icinga.py
new file mode 100644
index 000000000..ca56d5fe8
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/module_utils/icinga.py
@@ -0,0 +1,360 @@
+# -*- coding: utf-8 -*-
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import json
+from collections import defaultdict
+
+from ansible.module_utils.urls import fetch_url
+from ansible.module_utils.six import iteritems
+from ansible.module_utils.common.text.converters import to_text
+from ansible.module_utils.six.moves.urllib.parse import quote as urlquote
+
+
+class Icinga2APIObject(object):
+ """Interact with the icinga2 director API"""
+
+ def __init__(self, module, path, data):
+ self.module = module
+ self.params = module.params
+ self.path = path
+ self.data = data
+ self.object_id = None
+
+ def call_url(self, path, data="", method="GET"):
+ """
+ Execute the request against the API with the provided arguments and return json.
+
+ Parameters:
+ path: type str, the path of the api to call
+ data: type str, the module params passed to the api
+ method: type str, default "GET", the method to run against the api.
+ GET to check objects, POST to create or modify objects, DELETE to delete objects
+
+ Returns:
+ jsonString with return code, the resulting data from the api-call and errors if there are any
+ """
+
+ headers = {
+ "Accept": "application/json",
+ "X-HTTP-Method-Override": method,
+ }
+ url = self.module.params.get("url") + "/director" + path
+ rsp, info = fetch_url(
+ module=self.module,
+ url=url,
+ data=data,
+ headers=headers,
+ method=method,
+ use_proxy=self.module.params["use_proxy"],
+ )
+ content = ""
+ error = ""
+
+ # handle 400 errors
+ if info["status"] >= 400:
+ try:
+ content = json.loads(info["body"].decode("utf-8"))
+ error = content["error"]
+ except (ValueError, KeyError):
+ error = info["msg"]
+
+ # handle other errors
+ elif info["status"] < 0:
+ error = info["msg"]
+
+ # if nothing is modified when trying to change objects, fetch_url
+ # returns only the 304 status but no body.
+ # if that happens we set the content to an empty json object.
+ # else we serialize the response as a json object.
+ elif info["status"] == 304:
+ content = {}
+ else:
+ content = json.loads(rsp.read().decode("utf-8"))
+
+ return {"code": info["status"], "data": content, "error": error}
+
+ def exists(self, find_by="name"):
+ """
+ Check if the object already exists in the director.
+
+ Parameters:
+ find_by: type str, default "name", the object key to search for. by default 'name' of the object,
+ however service apply rules have no name and have to be found by their id.
+ Returns:
+ boolean that tells whether the object exists
+ """
+
+ ret = self.call_url(
+ path=self.path
+ + "?"
+ + find_by
+ + "="
+ + to_text(urlquote(self.data["object_name"]))
+ )
+ self.object_id = to_text(urlquote(self.data["object_name"]))
+ return ret["code"] == 200
+
+ def query(self, query="", resolved=False):
+ """
+ Find all matching objects in the director and return the result of the api-call.
+
+ Parameters:
+ query: type str, default "", searchstring to limit the results. By default Director will search in
+ the name of the resource. Usually that means 'object_name', but for services it also covers
+ the host name.
+ resolved: type bool, default False, resolve all object variables. If True, this will include all
+ variables inherited via imports.
+
+ Returns:
+ the result of the api-call
+ """
+
+ try:
+ ret = self.call_url(
+ path=self.path
+ + "?q="
+ + to_text(urlquote(query))
+ + ("&resolved" if resolved else "")
+ )
+ if ret["code"] != 200:
+ self.module.fail_json(
+ msg="bad return code while querying: %d. Error message: %s"
+ % (ret["code"], ret["error"])
+ )
+ return ret
+ except Exception as e:
+ self.module.fail_json(msg="exception when querying: " + str(e))
+
+ def query_deployment(self, configs=None, activities=None):
+ """
+ Find the current deployment or the deployment specified with configs or activities
+ in the director and return the result of the api-call.
+
+ Parameters:
+ configs: type list, default empty, list of checksums for configs to search for.
+ If left empty, only the active_configuration will be returned.
+ activities: type list, default empty, list of checksums for activities to search for.
+ If left empty, only the active_configuration will be returned.
+
+ Returns:
+ the result of the api-call
+ """
+
+ if configs is None:
+ configs = []
+
+ if activities is None:
+ activities = []
+
+ try:
+ ret = self.call_url(
+ path=self.path
+ + "?configs="
+ + ",".join(configs)
+ + "&activities="
+ + ",".join(activities)
+ )
+ if ret["code"] != 200:
+ self.module.fail_json(
+ msg="bad return code while querying: %d. Error message: %s"
+ % (ret["code"], ret["error"])
+ )
+ return ret
+ except Exception as e:
+ self.module.fail_json(msg="exception when querying: " + str(e))
+
+ def create(self):
+ """
+ Create the object in the director and return the result of the api-call.
+
+ Parameters:
+ none
+
+ Returns:
+ the result of the api-call
+ """
+
+ return self.call_url(
+ path=self.path, data=self.module.jsonify(self.data), method="POST"
+ )
+
+ def delete(self, find_by="name"):
+ """
+ Delete the object in the director and return the result of the api-call.
+
+ Parameters:
+ find_by: type str, default "name", the object key to search for. by default 'name' of the object,
+ however service apply rules have no name and have to be found by their id.
+ Returns:
+ the result of the api-call
+ """
+
+ return self.call_url(
+ path=self.path + "?" + find_by + "=" + self.object_id,
+ method="DELETE",
+ )
+
+ def modify(self, find_by="name"):
+ """
+ Modify the object in the director and return the result of the api-call.
+
+ Parameters:
+ find_by: type str, default "name", the object key to search for. by default 'name' of the object,
+ however service apply rules have no name and have to be found by their id.
+ Returns:
+ the result of the api-call
+ """
+
+ return self.call_url(
+ path=self.path + "?" + find_by + "=" + self.object_id,
+ data=self.module.jsonify(self.data),
+ method="POST",
+ )
+
+ def scrub_diff_value(self, value):
+ """
+ Scrub the 'command_id' key from the returned data.
+
+ The command api returns the command_id, rendering the diff useless
+
+ Parameters:
+ value: type dict, the dict to remove the command_id key from
+
+ Returns:
+ the dict value without the key command_id
+ """
+
+ if isinstance(value, dict):
+ for k, v in iteritems(value.copy()):
+ if isinstance(value[k], dict):
+ value[k].pop("command_id", None)
+
+ return value
+
+ def diff(self, find_by="name"):
+ """
+ Produce the diff for the changed object and return it.
+
+ Parameters:
+ find_by: type str, default "name", the object key to search for. by default 'name' of the object,
+ however service apply rules have no name and have to be found by their id.
+
+ Returns:
+ the generated diff
+ """
+
+ ret = self.call_url(
+ path=self.path + "?" + find_by + "=" + self.object_id + "&withNull",
+ )
+
+ data_from_director = json.loads(self.module.jsonify(ret["data"]))
+ data_from_task = json.loads(self.module.jsonify(self.data))
+
+ diff = defaultdict(dict)
+ for key, value in data_from_director.items():
+ value = self.scrub_diff_value(value)
+ if key in data_from_task.keys() and value != data_from_task[key]:
+ diff["before"][key] = "{val}".format(val=value)
+ diff["after"][key] = "{val}".format(val=data_from_task[key])
+
+ return diff
+
+ def update(self, state):
+ """
+ Create, update or delete the objects in the director.
+
+ Parameters:
+ state: type str, the state of the object, present or absent
+
+ Returns:
+ changed: whether the object was changed
+ diff_result: the diff of the object
+ """
+
+ changed = False
+ diff_result = {"before": "", "after": ""}
+
+ try:
+ exists = self.exists()
+ except Exception as e:
+ self.module.fail_json(msg="exception when deleting: " + str(e))
+ if exists:
+ diff_result["before"] = "state: present\n"
+ if state == "absent":
+ if self.module.check_mode:
+ diff_result["after"] = "state: absent\n"
+ self.module.exit_json(
+ changed=True,
+ object_name=self.data["object_name"],
+ diff=diff_result,
+ )
+ else:
+ try:
+ ret = self.delete()
+ if ret["code"] == 200:
+ changed = True
+ diff_result["after"] = "state: absent\n"
+ else:
+ self.module.fail_json(
+ msg="bad return code while deleting: %d. Error message: %s"
+ % (ret["code"], ret["error"])
+ )
+ except Exception as e:
+ self.module.fail_json(
+ msg="exception when deleting: " + str(e)
+ )
+
+ else:
+ try:
+ diff_result = self.diff()
+ except Exception as e:
+ self.module.fail_json(
+ msg="exception when diffing: " + str(e)
+ )
+
+ if self.module.check_mode:
+ if diff_result:
+ changed = True
+ self.module.exit_json(
+ changed=changed,
+ object_name=self.data["object_name"],
+ data=self.data,
+ diff=diff_result,
+ )
+
+ ret = self.modify()
+ if ret["code"] == 200:
+ changed = True
+ elif ret["code"] == 304:
+ changed = False
+ else:
+ self.module.fail_json(
+ msg="bad return code while modifying: %d. Error message: %s"
+ % (ret["code"], ret["error"])
+ )
+
+ else:
+ diff_result.update({"before": "state: absent\n"})
+ if state == "present":
+ if self.module.check_mode:
+ changed = True
+ diff_result.update({"after": "state: created\n"})
+ else:
+ try:
+ ret = self.create()
+ if ret["code"] == 201:
+ changed = True
+ diff_result.update({"after": "state: created\n"})
+ else:
+ self.module.fail_json(
+ msg="bad return code while creating: %d. Error message: %s"
+ % (ret["code"], ret["error"])
+ )
+ except Exception as e:
+ self.module.fail_json(
+ msg="exception while creating: " + str(e)
+ )
+ return changed, diff_result
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_command.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_command.py
new file mode 100644
index 000000000..5334bae40
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_command.py
@@ -0,0 +1,290 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2020 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_command
+short_description: Manage commands in Icinga2
+description:
+ - Add or remove a command to Icinga2 through the director API.
+author: Sebastian Gumprich (@rndmh3ro)
+version_added: '1.0.0'
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+notes:
+ - This module supports check mode.
+options:
+ state:
+ description:
+ - Apply feature state.
+ choices: [ "present", "absent" ]
+ default: present
+ type: str
+ command:
+ description:
+ - The command Icinga should run. Required when state is C(present).
+ - Absolute paths are accepted as provided, relative paths are prefixed with "PluginDir + ", similar Constant prefixes are allowed.
+ - Spaces will lead to separation of command path and standalone arguments.
+ - Please note that this means that we do not support spaces in plugin names and paths right now.
+ type: str
+ methods_execute:
+ description:
+ - Plugin Check commands are what you need when running checks against your infrastructure.
+ - Notification commands will be used when it comes to notify your users.
+ - Event commands allow you to trigger specific actions when problems occur.
+ - Some people use them for auto-healing mechanisms, like restarting services or rebooting systems at specific thresholds.
+ choices: ["PluginCheck", "PluginNotification", "PluginEvent"]
+ default: "PluginCheck"
+ aliases: ['command_type']
+ type: str
+ disabled:
+ description:
+ - Disabled objects will not be deployed.
+ type: bool
+ default: false
+ choices: [true, false]
+ object_name:
+ description:
+ - Name of the command.
+ aliases: ['name']
+ required: true
+ type: str
+ imports:
+ description:
+ - Importable templates, add as many as you want. Please note that order matters when importing properties from multiple templates - last one wins.
+ type: list
+ elements: str
+ default: []
+ timeout:
+ description:
+ - Optional command timeout. Allowed values are seconds or durations postfixed with a specific unit (for example 1m or also 3m 30s).
+ type: str
+ zone:
+ description:
+ - Icinga cluster zone. Allows to manually override Directors decisions of where to deploy your config to.
+ - You should consider not doing so unless you gained deep understanding of how an Icinga Cluster stack works.
+ type: str
+ vars:
+ description:
+ - Custom properties of the command.
+ type: "dict"
+ default: {}
+ arguments:
+ description:
+ - Arguments of the command.
+ - Each argument can take either a string, a json or a dict
+ - When using a dict as argument value, the following properties are supported.
+ C(skip_key), C(repeat_key), C(required), C(order), C(description)),
+ C(set_if), C(value).
+ - The C(value) property can be either a string, a json or a dict. When used as a dict, you can define
+ its C(type) as C(Function) and set its C(body) property as an Icinga DSL piece of config.
+ type: "dict"
+ append:
+ description:
+ - Do not overwrite the whole object but instead append the defined properties.
+ - Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+ - Note - Variables that are set by default will also be applied, even if not set.
+ type: bool
+ choices: [true, false]
+ version_added: '1.25.0'
+"""
+
+EXAMPLES = """
+- name: Create command
+ t_systems_mms.icinga_director.icinga_command:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ arguments:
+ '--authpassphrase':
+ value: $snmpv3_priv_key$
+ '--authprotocol':
+ value: $snmpv3_auth_protocol$
+ '--critical':
+ value: $centreon_critical$
+ '--filter':
+ value: $centreon_filter$
+ '--hostname':
+ value: $snmp_address$
+ '--maxrepetitions':
+ value: $centreon_maxrepetitions$
+ '--mode':
+ value: $centreon_mode$
+ '--plugin':
+ value: $centreon_plugin$
+ '--privpassphrase':
+ value: $snmpv3_auth_key$
+ '--privprotocol':
+ value: $snmpv3_priv_protocol$
+ '--snmp-community':
+ value: $snmp_community$
+ '--snmp-timeout':
+ value: $snmp_timeout$
+ '--snmp-username':
+ value: $snmpv3_user$
+ '--snmp-version':
+ value: $snmp_version$
+ '--subsetleef':
+ value: $centreon_subsetleef$
+ '--verbose':
+ set_if: $centreon_verbose$
+ '--warning':
+ value: $centreon_warning$
+ '--dummy-arg':
+ description: "dummy arg using Icinga DSL code"
+ value:
+ type: "Function"
+ body: 'return macro("$dummy_var$")'
+ command: "/opt/centreon-plugins/centreon_plugins.pl"
+ command_type: "PluginCheck"
+ disabled: false
+ object_name: centreon-plugins
+ imports:
+ - centreon-plugins-template
+ vars:
+ centreon_maxrepetitions: 20
+ centreon_subsetleef: 20
+ centreon_verbose: false
+ snmp_address: $address$
+ snmp_timeout: 60
+ snmp_version: '2'
+ snmpv3_auth_key: authkey
+ snmpv3_priv_key: privkey
+ snmpv3_user: user
+
+- name: Update command
+ t_systems_mms.icinga_director.icinga_command:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: centreon-plugins
+ timeout: "1m"
+ append: true
+
+- name: Create event command
+ t_systems_mms.icinga_director.icinga_command:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ command: "/opt/scripts/restart_httpd"
+ object_name: "restart_httpd"
+ command_type: "PluginEvent"
+ arguments:
+ '-s':
+ value: $service.state$
+ '-t':
+ value: $service.state_type$
+ '-a':
+ set_if: $service.check_attempt$
+ value: $restart_service$
+"""
+
+RETURN = r""" # """
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.urls import url_argument_spec
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+
+
+# ===========================================
+# Module execution.
+#
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+ # add our own arguments
+ argument_spec.update(
+ state=dict(default="present", choices=["absent", "present"]),
+ url=dict(required=True),
+ append=dict(type="bool", choices=[True, False]),
+ object_name=dict(required=True, aliases=["name"]),
+ imports=dict(type="list", elements="str", required=False, default=[]),
+ disabled=dict(
+ type="bool", required=False, default=False, choices=[True, False]
+ ),
+ vars=dict(type="dict", default={}),
+ command=dict(required=False),
+ methods_execute=dict(
+ default="PluginCheck",
+ choices=["PluginCheck", "PluginNotification", "PluginEvent"],
+ aliases=["command_type"],
+ ),
+ timeout=dict(required=False, default=None),
+ zone=dict(required=False, default=None),
+ arguments=dict(type="dict", default=None),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ # type of arguments is actually dict, i.e. without specification = {}
+ # the director API returns an empty array if nothing is defined
+ # therefore overwrite so that the diff works better
+ if not module.params["arguments"]:
+ module.params["arguments"] = []
+
+ data_keys = [
+ "object_name",
+ "imports",
+ "disabled",
+ "vars",
+ "command",
+ "methods_execute",
+ "timeout",
+ "zone",
+ "arguments",
+ ]
+
+ data = {}
+
+ if module.params["append"]:
+ for k in data_keys:
+ if module.params[k]:
+ data[k] = module.params[k]
+ else:
+ for k in data_keys:
+ data[k] = module.params[k]
+
+ data["object_type"] = "object"
+
+ icinga_object = Icinga2APIObject(module=module, path="/command", data=data)
+
+ changed, diff = icinga_object.update(module.params["state"])
+ module.exit_json(
+ changed=changed,
+ diff=diff,
+ )
+
+
+# import module snippets
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_command_info.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_command_info.py
new file mode 100644
index 000000000..358325d69
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_command_info.py
@@ -0,0 +1,133 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2021 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_command_info
+short_description: Query commands in Icinga2
+description:
+ - Get a list of command objects from Icinga2 through the director API.
+author: Martin Schurz (@schurzi)
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+version_added: '1.13.0'
+notes:
+ - This module supports check mode.
+options:
+ query:
+ description:
+ - Text to filter search results.
+ - The text is matched on object_name.
+ - Only objects containing this text will be returned in the resultset.
+ - Requires Icinga Director 1.8.0+, in earlier versions this parameter is ignored and all objects are returned.
+ required: false
+ type: str
+ default: ""
+ resolved:
+ description:
+ - Resolve all inherited object properties and omit templates in output.
+ type: bool
+ default: false
+ choices: [true, false]
+ external:
+ description:
+ - Also include external objects in output.
+ type: bool
+ default: false
+ choices: [true, false]
+"""
+
+EXAMPLES = """
+- name: Query a command in icinga
+ t_systems_mms.icinga_director.icinga_command_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "centreon-plugins"
+"""
+
+RETURN = r"""
+objects:
+ description:
+ - A list of returned Director objects.
+ - The list contains all objects matching the query filter.
+ - If the filter does not match any object, the list will be empty.
+ returned: always
+ type: list
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.urls import url_argument_spec
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+
+
+# ===========================================
+# Module execution.
+#
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+ # add our own arguments
+ argument_spec.update(
+ url=dict(required=True),
+ query=dict(type="str", required=False, default=""),
+ resolved=dict(type="bool", default=False, choices=[True, False]),
+ external=dict(type="bool", default=False, choices=[True, False]),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ icinga_object = Icinga2APIObject(module=module, path="/commands", data=[])
+
+ object_list = icinga_object.query(
+ query=module.params["query"], resolved=module.params["resolved"]
+ )
+
+ # icinga also returns normal objects when querying templates,
+ # we need to filter these
+ filtered_list = [
+ i
+ for i in object_list["data"]["objects"]
+ if i["object_type"] != "template"
+ ]
+
+ if not module.params["external"]:
+ filtered_list = [
+ i for i in filtered_list if i["object_type"] != "external_object"
+ ]
+
+ module.exit_json(
+ objects=filtered_list,
+ )
+
+
+# import module snippets
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_command_template.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_command_template.py
new file mode 100644
index 000000000..4df7a540d
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_command_template.py
@@ -0,0 +1,269 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2020 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_command_template
+short_description: Manage command templates in Icinga2
+description:
+ - Add or remove a command template to Icinga2 through the director API.
+author: Lars Krahl (@mmslkr)
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+version_added: '1.1.0'
+notes:
+ - This module supports check mode.
+options:
+ state:
+ description:
+ - Apply feature state.
+ choices: [ "present", "absent" ]
+ default: present
+ type: str
+ command:
+ description:
+ - The command Icinga should run.
+ - Absolute paths are accepted as provided, relative paths are prefixed with "PluginDir + ", similar Constant prefixes are allowed.
+ - Spaces will lead to separation of command path and standalone arguments.
+ - Please note that this means that we do not support spaces in plugin names and paths right now.
+ type: str
+ methods_execute:
+ description:
+ - Plugin Check commands are what you need when running checks against your infrastructure.
+ - Notification commands will be used when it comes to notify your users.
+ - Event commands allow you to trigger specific actions when problems occur.
+ - Some people use them for auto-healing mechanisms, like restarting services or rebooting systems at specific thresholds.
+ choices: ["PluginCheck", "PluginNotification", "PluginEvent"]
+ default: "PluginCheck"
+ aliases: ['command_type']
+ type: str
+ disabled:
+ description:
+ - Disabled objects will not be deployed.
+ type: bool
+ default: false
+ choices: [true, false]
+ object_name:
+ description:
+ - Name of the command template.
+ aliases: ['name']
+ required: true
+ type: str
+ imports:
+ description:
+ - Importable templates, add as many as you want. Please note that order matters when importing properties from multiple templates - last one wins.
+ type: list
+ elements: str
+ default: []
+ timeout:
+ description:
+ - Optional command timeout. Allowed values are seconds or durations postfixed with a specific unit (for example 1m or also 3m 30s).
+ type: str
+ zone:
+ description:
+ - Icinga cluster zone. Allows to manually override Directors decisions of where to deploy your config to.
+ - You should consider not doing so unless you gained deep understanding of how an Icinga Cluster stack works.
+ type: str
+ vars:
+ description:
+ - Custom properties of the command template.
+ type: "dict"
+ default: {}
+ arguments:
+ description:
+ - Arguments of the command template.
+ - Each argument can take either a string, a json or a dict
+ - When using a dict as argument value, the following properties are supported.
+ C(skip_key), C(repeat_key), C(required), C(order), C(description)),
+ C(set_if), C(value).
+ - The C(value) property can be either a string, a json or a dict. When used as a dict, you can define
+ its C(type) as C(Function) and set its C(body) property as an Icinga DSL piece of config.
+ type: "dict"
+ append:
+ description:
+ - Do not overwrite the whole object but instead append the defined properties.
+ - Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+ - Note - Variables that are set by default will also be applied, even if not set.
+ type: bool
+ choices: [true, false]
+ version_added: '1.25.0'
+"""
+
+EXAMPLES = """
+- name: Create command template
+ t_systems_mms.icinga_director.icinga_command_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ arguments:
+ '--authpassphrase':
+ value: $snmpv3_priv_key$
+ '--authprotocol':
+ value: $snmpv3_auth_protocol$
+ '--critical':
+ value: $centreon_critical$
+ '--filter':
+ value: $centreon_filter$
+ '--hostname':
+ value: $snmp_address$
+ '--maxrepetitions':
+ value: $centreon_maxrepetitions$
+ '--mode':
+ value: $centreon_mode$
+ '--plugin':
+ value: $centreon_plugin$
+ '--privpassphrase':
+ value: $snmpv3_auth_key$
+ '--privprotocol':
+ value: $snmpv3_priv_protocol$
+ '--snmp-community':
+ value: $snmp_community$
+ '--snmp-timeout':
+ value: $snmp_timeout$
+ '--snmp-username':
+ value: $snmpv3_user$
+ '--snmp-version':
+ value: $snmp_version$
+ '--subsetleef':
+ value: $centreon_subsetleef$
+ '--verbose':
+ set_if: $centreon_verbose$
+ '--warning':
+ value: $centreon_warning$
+ '--dummy-arg':
+ description: "dummy arg using Icinga DSL code"
+ value:
+ type: "Function"
+ body: 'return macro("$dummy_var$")'
+ command: "/opt/centreon-plugins/centreon_plugins.pl"
+ command_type: "PluginCheck"
+ object_name: centreon-plugins-template
+ disabled: false
+ vars:
+ centreon_maxrepetitions: 20
+ centreon_subsetleef: 20
+ centreon_verbose: false
+ snmp_address: $address$
+ snmp_timeout: 60
+ snmp_version: '2'
+ snmpv3_auth_key: authkey
+ snmpv3_priv_key: privkey
+ snmpv3_user: user
+
+- name: Update command template
+ t_systems_mms.icinga_director.icinga_command_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: centreon-plugins-template
+ timeout: "2m"
+ append: true
+"""
+
+RETURN = r""" # """
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.urls import url_argument_spec
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+
+
+# ===========================================
+# Module execution.
+#
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+ # add our own arguments
+ argument_spec.update(
+ state=dict(default="present", choices=["absent", "present"]),
+ url=dict(required=True),
+ append=dict(type="bool", choices=[True, False]),
+ object_name=dict(required=True, aliases=["name"]),
+ imports=dict(type="list", elements="str", required=False, default=[]),
+ disabled=dict(
+ type="bool", required=False, default=False, choices=[True, False]
+ ),
+ vars=dict(type="dict", default={}),
+ command=dict(required=False),
+ methods_execute=dict(
+ default="PluginCheck",
+ choices=["PluginCheck", "PluginNotification", "PluginEvent"],
+ aliases=["command_type"],
+ ),
+ timeout=dict(required=False, default=None),
+ zone=dict(required=False, default=None),
+ arguments=dict(type="dict", default=None),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ # `arguments` is of type dict, default should be {}
+ # however, the director api returns [] when no `arguments` are set, making the diff seem changed
+ # therefore set the default to [] as well to get a clean diff output
+ if not module.params["arguments"]:
+ module.params["arguments"] = []
+
+ data_keys = [
+ "object_name",
+ "imports",
+ "disabled",
+ "vars",
+ "command",
+ "methods_execute",
+ "timeout",
+ "zone",
+ "arguments",
+ ]
+
+ data = {}
+
+ if module.params["append"]:
+ for k in data_keys:
+ if module.params[k]:
+ data[k] = module.params[k]
+ else:
+ for k in data_keys:
+ data[k] = module.params[k]
+
+ data["object_type"] = "template"
+
+ icinga_object = Icinga2APIObject(module=module, path="/command", data=data)
+
+ changed, diff = icinga_object.update(module.params["state"])
+ module.exit_json(
+ changed=changed,
+ diff=diff,
+ )
+
+
+# import module snippets
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_command_template_info.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_command_template_info.py
new file mode 100644
index 000000000..7909c4dca
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_command_template_info.py
@@ -0,0 +1,122 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2021 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_command_template_info
+short_description: Query command templates in Icinga2
+description:
+ - Get a list of command template objects from Icinga2 through the director API.
+author: Martin Schurz (@schurzi)
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+version_added: '1.13.0'
+notes:
+ - This module supports check mode.
+options:
+ query:
+ description:
+ - Text to filter search results.
+ - The text is matched on object_name.
+ - Only objects containing this text will be returned in the resultset.
+ - Requires Icinga Director 1.8.0+, in earlier versions this parameter is ignored and all objects are returned.
+ required: false
+ type: str
+ default: ""
+ resolved:
+ description:
+ - Resolve all inherited object properties and omit templates in output.
+ type: bool
+ default: false
+ choices: [true, false]
+"""
+
+EXAMPLES = """
+- name: Query a command template in icinga
+ t_systems_mms.icinga_director.icinga_command_template_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "centreon-plugins-template"
+"""
+
+RETURN = r"""
+objects:
+ description:
+ - A list of returned Director objects.
+ - The list contains all objects matching the query filter.
+ - If the filter does not match any object, the list will be empty.
+ returned: always
+ type: list
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.urls import url_argument_spec
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+
+
+# ===========================================
+# Module execution.
+#
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+ # add our own arguments
+ argument_spec.update(
+ url=dict(required=True),
+ query=dict(type="str", required=False, default=""),
+ resolved=dict(type="bool", default=False, choices=[True, False]),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ icinga_object = Icinga2APIObject(
+ module=module, path="/commands/templates", data=[]
+ )
+
+ object_list = icinga_object.query(
+ query=module.params["query"], resolved=module.params["resolved"]
+ )
+
+ # icinga also returns normal objects when querying templates,
+ # we need to filter these
+ filtered_list = [
+ i
+ for i in object_list["data"]["objects"]
+ if i["object_type"] == "template"
+ ]
+ module.exit_json(
+ objects=filtered_list,
+ )
+
+
+# import module snippets
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_deploy.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_deploy.py
new file mode 100644
index 000000000..74b29f6ab
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_deploy.py
@@ -0,0 +1,119 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2023 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_deploy
+short_description: Trigger deployment in Icinga2
+description:
+ - Trigger a deployment to Icinga2 through the director API.
+author: Falk Händler (@flkhndlr)
+version_added: '1.33.0'
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+"""
+
+EXAMPLES = """
+- name: Deploy the icinga config
+ t_systems_mms.icinga_director.icinga_deploy:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+"""
+
+RETURN = r"""
+checksum:
+ description:
+ - Checksum of the configuration that should be rolled out
+ returned: always
+ type: str
+ sample:
+ checksum: 294bdfb53c4da471e37317beed549a953c939424
+"""
+
+
+from time import sleep
+from ansible.module_utils.urls import url_argument_spec
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+# ===========================================
+# Module execution.
+#
+
+
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+
+ # add our own arguments
+ argument_spec.update(
+ url=dict(required=True),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=False,
+ )
+
+ # get the current deployment status
+ icinga_deploy_status = Icinga2APIObject(module=module, path="/config/deployment-status", data=[])
+
+ # if there is no existing deployment (e.g. on a new instance), there is no config object
+ if "config" in icinga_deploy_status.query_deployment()["data"]["active_configuration"]:
+ active_deployment = icinga_deploy_status.query_deployment()["data"]["active_configuration"]["config"]
+ else:
+ active_deployment = ""
+
+ # execute the deployment
+ icinga_deployment = Icinga2APIObject(module=module, path="/config/deploy", data=[])
+ result = icinga_deployment.create()
+ # the deployment is asynchronous and I don't know of a way to check if it is finished.
+ # so we need some sleep here. 2 seconds is a wild guess.
+ sleep(2)
+
+ # get the new deployment status
+ create_deployment = icinga_deploy_status.query_deployment()["data"]["active_configuration"]["config"]
+
+ # when the old checksum, the checksum to be created and the new checksum are the same, nothing changed
+ if result["data"]["checksum"] == active_deployment == create_deployment:
+ module.exit_json(
+ changed=False,
+ checksum=result["data"]["checksum"],
+ )
+ # when the current and new deployment are the same, but the checksum to be created is different, the deployment failed
+ elif create_deployment == active_deployment:
+ module.fail_json(msg="deployment failed")
+ # in other cases the deployment succeeded and changed something
+ else:
+ module.exit_json(
+ changed=True,
+ checksum=result["data"]["checksum"],
+ )
+
+
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_deploy_info.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_deploy_info.py
new file mode 100644
index 000000000..3138dd82b
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_deploy_info.py
@@ -0,0 +1,140 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2023 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_deploy_info
+short_description: Get deployment information through the director API
+description:
+ - Get deployment information through the director API.
+author: Falk Händler (@flkhndlr)
+version_added: '1.33.0'
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+options:
+ configs:
+ description:
+ - A list of checksums of configs to query information for
+ type: list
+ elements: str
+ activities:
+ description:
+ - A list of checksums of activities to query information for
+ type: list
+ elements: str
+"""
+
+EXAMPLES = """
+- name: Query the current deployment info in icinga
+ t_systems_mms.icinga_director.icinga_deploy_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+"""
+
+RETURN = r"""
+active_configuration:
+ description:
+ - Checksums of the active configuration
+ - Contains current activity checksum, config checksum
+ - and a checksum for the stage_name
+ returned: if active configuration exists
+ type: dict
+ sample:
+ active_configuration:
+ activity: 3557598829f2a2fc4acc7b565fb54bae24754c67
+ config: 299d9d49e03435c6de562c4b22a26e63990d30a9
+ stage_name: 902cb282-e702-43ce-bb3c-962f850a1694
+configs:
+ description:
+ - Checksum of the requested config and its state
+ returned: only if requested
+ type: list
+ sample:
+ configs:
+ b175ca0562434deeb4fb1fc03fd80cd7361b56df: deployed
+ b175ca0562434deeb4fb1fc03fd80cd7361b56de: active
+activities:
+ description:
+ - checksum of the requested activities and its state
+ returned: only if requested
+ type: list
+ sample:
+ activities:
+ a4c955364bc7b77efd0323fc87d95307f827e30c: deployed
+ 3557598829f2a2fc4acc7b565fb54bae24754c67: active
+"""
+
+from ansible.module_utils.urls import url_argument_spec
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+
+
+# ===========================================
+# Module execution.
+#
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+
+ # add our own arguments
+ argument_spec.update(
+ url=dict(required=True),
+ configs=dict(type="list", required=False, default=None, elements="str"),
+ activities=dict(type="list", required=False, default=None, elements="str"),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ icinga_object = Icinga2APIObject(module=module, path="/config/deployment-status", data=[])
+
+ object_list = icinga_object.query_deployment(
+ configs=module.params["configs"], activities=module.params["activities"]
+ )
+
+ config_list = {}
+ activity_list = {}
+
+ if "configs" in object_list["data"].keys():
+ config_list = dict(object_list["data"]["configs"].items())
+
+ if "activities" in object_list["data"].keys():
+ activity_list = dict(object_list["data"]["activities"].items())
+
+ module.exit_json(
+ objects=object_list,
+ active_configuration=object_list["data"]["active_configuration"],
+ configs=config_list,
+ activities=activity_list
+ )
+
+
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_endpoint.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_endpoint.py
new file mode 100644
index 000000000..eb18d0b5d
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_endpoint.py
@@ -0,0 +1,168 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2020 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_endpoint
+short_description: Manage endpoints in Icinga2
+description:
+ - Add or remove an endpoint to Icinga2 through the director API.
+author: Aaron Bulmahn (@arbu)
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+version_added: '1.5.0'
+notes:
+ - This module supports check mode.
+options:
+ state:
+ description:
+ - Apply feature state.
+ choices: [ "present", "absent" ]
+ default: present
+ type: str
+ object_name:
+ description:
+ - Icinga object name for this endpoint.
+ - This is usually a fully qualified host name but it could basically be any kind of string.
+ - To make things easier for your users we strongly suggest to use meaningful names for templates.
+ - For example "generic-endpoint" is ugly, "Standard Linux Server" is easier to understand.
+ required: true
+ aliases: ['name']
+ type: str
+ host:
+ description:
+ - The hostname/IP address of the remote Icinga 2 instance.
+ type: str
+ port:
+ description:
+ - The service name/port of the remote Icinga 2 instance. Defaults to 5665.
+ type: int
+ log_duration:
+ description:
+ - Duration for keeping replay logs on connection loss. Defaults to 1d (86400 seconds).
+ Attribute is specified in seconds. If log_duration is set to 0, replaying logs is disabled.
+ You could also specify the value in human readable format like 10m for 10 minutes or 1h for one hour.
+ type: str
+ zone:
+ description:
+ - The name of the zone this endpoint is part of.
+ type: str
+ append:
+ description:
+ - Do not overwrite the whole object but instead append the defined properties.
+ - Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+ - Note - Variables that are set by default will also be applied, even if not set.
+ type: bool
+ choices: [true, false]
+ version_added: '1.25.0'
+"""
+
+EXAMPLES = """
+- name: Create an endpoint in icinga
+ t_systems_mms.icinga_director.icinga_endpoint:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "fooendpoint"
+ host: "127.0.0.1"
+ zone: "foozone"
+
+- name: Update an endpoint in icinga
+ t_systems_mms.icinga_director.icinga_endpoint:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "fooendpoint"
+ host: "127.0.0.1"
+ zone: "foozone"
+ port: 5665
+ append: true
+"""
+
+RETURN = r""" # """
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.urls import url_argument_spec
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+
+
+# ===========================================
+# Module execution.
+#
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+ # add our own arguments
+ argument_spec.update(
+ state=dict(default="present", choices=["absent", "present"]),
+ url=dict(required=True),
+ append=dict(type="bool", choices=[True, False]),
+ object_name=dict(required=True, aliases=["name"]),
+ host=dict(required=False),
+ port=dict(required=False, type="int"),
+ log_duration=dict(required=False),
+ zone=dict(required=False),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ data_keys = [
+ "object_name",
+ "host",
+ "port",
+ "log_duration",
+ "zone",
+ ]
+
+ data = {}
+
+ if module.params["append"]:
+ for k in data_keys:
+ if module.params[k]:
+ data[k] = module.params[k]
+ else:
+ for k in data_keys:
+ data[k] = module.params[k]
+
+ data["object_type"] = "object"
+
+ icinga_object = Icinga2APIObject(module=module, path="/endpoint", data=data)
+
+ changed, diff = icinga_object.update(module.params["state"])
+ module.exit_json(
+ changed=changed,
+ diff=diff,
+ )
+
+
+# import module snippets
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_endpoint_info.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_endpoint_info.py
new file mode 100644
index 000000000..37c10c0e4
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_endpoint_info.py
@@ -0,0 +1,112 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2021 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_endpoint_info
+short_description: Query endpoints in Icinga2
+description:
+ - Get a list of endpoint objects from Icinga2 through the director API.
+author: Martin Schurz (@schurzi)
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+version_added: '1.13.0'
+notes:
+ - This module supports check mode.
+options:
+ query:
+ description:
+ - Text to filter search results.
+ - The text is matched on object_name.
+ - Only objects containing this text will be returned in the resultset.
+ - Requires Icinga Director 1.8.0+, in earlier versions this parameter is ignored and all objects are returned.
+ required: false
+ type: str
+ default: ""
+ resolved:
+ description:
+ - Resolve all inherited object properties and omit templates in output.
+ type: bool
+ default: false
+ choices: [true, false]
+"""
+
+EXAMPLES = """
+- name: Query an endpoint in icinga
+ t_systems_mms.icinga_director.icinga_endpoint_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "fooendpoint"
+"""
+
+RETURN = r"""
+objects:
+ description:
+ - A list of returned Director objects.
+ - The list contains all objects matching the query filter.
+ - If the filter does not match any object, the list will be empty.
+ returned: always
+ type: list
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.urls import url_argument_spec
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+
+
+# ===========================================
+# Module execution.
+#
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+ # add our own arguments
+ argument_spec.update(
+ url=dict(required=True),
+ query=dict(type="str", required=False, default=""),
+ resolved=dict(type="bool", default=False, choices=[True, False]),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ icinga_object = Icinga2APIObject(module=module, path="/endpoints", data=[])
+
+ object_list = icinga_object.query(
+ query=module.params["query"], resolved=module.params["resolved"]
+ )
+ module.exit_json(
+ objects=object_list["data"]["objects"],
+ )
+
+
+# import module snippets
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_host.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_host.py
new file mode 100644
index 000000000..dc2e0fa0d
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_host.py
@@ -0,0 +1,445 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2020 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_host
+short_description: Manage hosts in Icinga2
+description:
+ - Add or remove a host to Icinga2 through the director API.
+author: Sebastian Gumprich (@rndmh3ro)
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+version_added: '1.0.0'
+notes:
+ - This module supports check mode.
+options:
+ accept_config:
+ choices:
+ - true
+ - false
+ description:
+ - Whether the agent is configured to accept config.
+ type: bool
+ version_added: 1.9.0
+ address:
+ description:
+ - Host address. Usually an IPv4 address, but may be any kind of address your check plugin is able to deal with.
+ type: str
+ address6:
+ description:
+ - Host IPv6 address. Usually an IPv6 address, but may be any kind of address your check plugin is able to deal with.
+ type: str
+ version_added: 1.4.0
+ append:
+ choices:
+ - true
+ - false
+ description:
+ - Do not overwrite the whole object but instead append the defined properties.
+ - Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+ - Note - Variables that are set by default will also be applied, even if not set.
+ type: bool
+ version_added: 1.25.0
+ check_command:
+ description:
+ - The name of the check command.
+ - Though this is not required to be defined in the director, you still have to supply a check_command in a host or host-template.
+ type: str
+ check_interval:
+ description:
+ - Your regular check interval.
+ type: str
+ check_period:
+ description:
+ - The name of a time period which determines when this object should be monitored. Not limited by default.
+ type: str
+ check_timeout:
+ description:
+ - Check command timeout in seconds. Overrides the CheckCommand's timeout attribute
+ type: str
+ command_endpoint:
+ description:
+ - The endpoint where commands are executed on.
+ type: str
+ disabled:
+ choices:
+ - true
+ - false
+ default: false
+ description:
+ - Disabled objects will not be deployed.
+ type: bool
+ display_name:
+ description:
+ - Alternative name for this host. Might be a host alias or and kind of string helping your users to identify this host.
+ type: str
+ enable_active_checks:
+ choices:
+ - true
+ - false
+ description:
+ - Whether to actively check this object.
+ type: bool
+ enable_event_handler:
+ choices:
+ - true
+ - false
+ description:
+ - Whether to enable event handlers this object.
+ type: bool
+ enable_flapping:
+ choices:
+ - true
+ - false
+ description:
+ - Whether flap detection is enabled on this object.
+ type: bool
+ enable_notifications:
+ choices:
+ - true
+ - false
+ description:
+ - Whether to send notifications for this object.
+ type: bool
+ enable_passive_checks:
+ choices:
+ - true
+ - false
+ description:
+ - Whether to accept passive check results for this object.
+ type: bool
+ enable_perfdata:
+ choices:
+ - true
+ - false
+ description:
+ - Whether to process performance data provided by this object.
+ type: bool
+ event_command:
+ description:
+ - Event command for host which gets called on every check execution if one of these conditions matches
+ - The host is in a soft state
+ - The host state changes into a hard state
+ - The host state recovers from a soft or hard state to OK/Up
+ type: str
+ flapping_threshold_high:
+ description:
+ - Flapping upper bound in percent for a service to be considered flapping
+ type: str
+ flapping_threshold_low:
+ description:
+ - Flapping lower bound in percent for a service to be considered not flapping
+ type: str
+ groups:
+ default: []
+ description:
+ - Hostgroups that should be directly assigned to this node. Hostgroups can be useful for various reasons.
+ - You might assign service checks based on assigned hostgroup. They are also often used as an instrument to enforce restricted views in Icinga Web 2.
+ - Hostgroups can be directly assigned to single hosts or to host templates.
+ - You might also want to consider assigning hostgroups using apply rules.
+ elements: str
+ type: list
+ has_agent:
+ choices:
+ - true
+ - false
+ description:
+ - Whether this host has the Icinga 2 Agent installed.
+ type: bool
+ version_added: 1.9.0
+ icon_image:
+ description:
+ - An URL pointing to an icon for this object.
+ - Try "tux.png" for icons relative to public/img/icons or "cloud" (no extension) for items from the Icinga icon font
+ type: str
+ icon_image_alt:
+ description:
+ - Alternative text to be shown in case above icon is missing
+ type: str
+ imports:
+ description:
+ - Choose a Host Template. Required when state is C(present).
+ - Required if I(state) is C(present).
+ elements: str
+ type: list
+ master_should_connect:
+ choices:
+ - true
+ - false
+ description:
+ - Whether the parent (master) node should actively try to connect to this agent.
+ type: bool
+ version_added: 1.9.0
+ max_check_attempts:
+ description:
+ - Defines after how many check attempts a new hard state is reached.
+ type: str
+ notes:
+ description:
+ - Additional notes for this object.
+ type: str
+ version_added: 1.8.0
+ notes_url:
+ description:
+ - An URL pointing to additional notes for this object.
+ - Separate multiple urls like this "'http://url1' 'http://url2'".
+ - Maximum length is 255 characters.
+ type: str
+ version_added: 1.8.0
+ object_name:
+ aliases:
+ - name
+ description:
+ - Icinga object name for this host.
+ - This is usually a fully qualified host name but it could basically be any kind of string.
+ - To make things easier for your users we strongly suggest to use meaningful names for templates.
+ - For example "generic-host" is ugly, "Standard Linux Server" is easier to understand.
+ required: true
+ type: str
+ retry_interval:
+ description:
+ - Retry interval, will be applied after a state change unless the next hard state is reached.
+ type: str
+ state:
+ choices:
+ - present
+ - absent
+ default: present
+ description:
+ - Apply feature state.
+ type: str
+ vars:
+ description:
+ - Custom properties of the host.
+ type: dict
+ volatile:
+ choices:
+ - true
+ - false
+ description:
+ - Whether this check is volatile.
+ type: bool
+ zone:
+ description:
+ - Set the zone.
+ type: str
+"""
+
+EXAMPLES = """
+- name: Create a host in icinga
+ t_systems_mms.icinga_director.icinga_host:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ accept_config: true
+ address: "127.0.0.1"
+ address6: "::1"
+ check_command: hostalive
+ check_interval: 90s
+ check_timeout: 60
+ command_endpoint: fooendpoint
+ disabled: false
+ display_name: "foohost"
+ enable_active_checks: true
+ enable_event_handler: false
+ enable_flapping: false
+ enable_notifications: true
+ enable_passive_checks: false
+ enable_perfdata: false
+ flapping_threshold_high: "30.0"
+ flapping_threshold_low: "25.0"
+ has_agent: true
+ icon_image_alt: "alt text"
+ icon_image: "http://url1"
+ master_should_connect: true
+ max_check_attempts: 3
+ object_name: "foohost"
+ retry_interval: "1m"
+ volatile: false
+ groups:
+ - "foohostgroup"
+ imports:
+ - "foohosttemplate"
+ vars:
+ dnscheck: "no"
+
+- name: update a host in icinga
+ t_systems_mms.icinga_director.icinga_host:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "foohost"
+ notes: "example note"
+ notes_url: "'http://url1' 'http://url2'"
+ append: true
+"""
+
+RETURN = r""" # """
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.urls import url_argument_spec
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+
+
+# ===========================================
+# Module execution.
+#
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+ # add our own arguments
+ argument_spec.update(
+ accept_config=dict(type="bool", choices=[True, False]),
+ address=dict(required=False),
+ address6=dict(required=False),
+ append=dict(type="bool", choices=[True, False]),
+ check_command=dict(required=False),
+ check_interval=dict(required=False),
+ check_period=dict(type="str", required=False),
+ check_timeout=dict(type="str", required=False),
+ command_endpoint=dict(type="str", required=False),
+ disabled=dict(type="bool", default=False, choices=[True, False]),
+ display_name=dict(required=False),
+ enable_active_checks=dict(
+ type="bool", choices=[True, False], required=False
+ ),
+ enable_event_handler=dict(
+ type="bool", choices=[True, False], required=False
+ ),
+ enable_flapping=dict(
+ type="bool", choices=[True, False], required=False
+ ),
+ enable_notifications=dict(
+ type="bool", choices=[True, False], required=False
+ ),
+ enable_passive_checks=dict(
+ type="bool", choices=[True, False], required=False
+ ),
+ enable_perfdata=dict(
+ type="bool", choices=[True, False], required=False
+ ),
+ event_command=dict(type="str", required=False),
+ flapping_threshold_high=dict(type="str", required=False),
+ flapping_threshold_low=dict(type="str", required=False),
+ groups=dict(type="list", elements="str", default=[], required=False),
+ has_agent=dict(type="bool", choices=[True, False]),
+ icon_image_alt=dict(type="str", required=False),
+ icon_image=dict(type="str", required=False),
+ imports=dict(type="list", elements="str", required=False),
+ master_should_connect=dict(type="bool", choices=[True, False]),
+ max_check_attempts=dict(required=False),
+ notes_url=dict(type="str", required=False),
+ notes=dict(type="str", required=False),
+ object_name=dict(required=True, aliases=["name"]),
+ retry_interval=dict(required=False),
+ state=dict(default="present", choices=["absent", "present"]),
+ url=dict(required=True),
+ vars=dict(type="dict", default=None),
+ volatile=dict(type="bool", choices=[True, False], required=False),
+ zone=dict(required=False, default=None),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ # When deleting objects, only the name is necessary, so we cannot use
+ # required=True in the argument_spec. Instead we define here what is
+ # necessary when state is present and we do not append to an existing object
+ # We cannot use "required_if" here, because we rely on module.params.
+ # These are defined at the same time we'd define the required_if arguments.
+ if (
+ module.params["state"] == "present"
+ and not module.params["append"]
+ and not (module.params["imports"])
+ ):
+ module.fail_json(msg="missing required arguments: imports.")
+
+ data_keys = [
+ "accept_config",
+ "address",
+ "address6",
+ "check_command",
+ "check_interval",
+ "check_period",
+ "check_timeout",
+ "command_endpoint",
+ "disabled",
+ "display_name",
+ "enable_active_checks",
+ "enable_event_handler",
+ "enable_flapping",
+ "enable_notifications",
+ "enable_passive_checks",
+ "enable_perfdata",
+ "event_command",
+ "flapping_threshold_high",
+ "flapping_threshold_low",
+ "groups",
+ "has_agent",
+ "icon_image_alt",
+ "icon_image",
+ "imports",
+ "master_should_connect",
+ "max_check_attempts",
+ "notes_url",
+ "notes",
+ "object_name",
+ "retry_interval",
+ "vars",
+ "volatile",
+ "zone",
+ ]
+
+ data = {}
+
+ if module.params["append"]:
+ for k in data_keys:
+ if module.params[k]:
+ data[k] = module.params[k]
+ else:
+ for k in data_keys:
+ data[k] = module.params[k]
+
+ data["object_type"] = "object"
+
+ icinga_object = Icinga2APIObject(module=module, path="/host", data=data)
+
+ changed, diff = icinga_object.update(module.params["state"])
+ module.exit_json(
+ changed=changed,
+ diff=diff,
+ )
+
+
+# import module snippets
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_host_info.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_host_info.py
new file mode 100644
index 000000000..470e3b8b6
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_host_info.py
@@ -0,0 +1,112 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2021 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_host_info
+short_description: Query hosts in Icinga2
+description:
+ - Get a list of host objects from Icinga2 through the director API.
+author: Martin Schurz (@schurzi)
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+version_added: '1.13.0'
+notes:
+ - This module supports check mode.
+options:
+ query:
+ description:
+ - Text to filter search results.
+ - The text is matched on object_name.
+ - Only objects containing this text will be returned in the resultset.
+ - Requires Icinga Director 1.8.0+, in earlier versions this parameter is ignored and all objects are returned.
+ required: false
+ type: str
+ default: ""
+ resolved:
+ description:
+ - Resolve all inherited object properties and omit templates in output.
+ type: bool
+ default: false
+ choices: [true, false]
+"""
+
+EXAMPLES = """
+- name: Query a host in icinga
+ t_systems_mms.icinga_director.icinga_host_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "foohost"
+"""
+
+RETURN = r"""
+objects:
+ description:
+ - A list of returned Director objects.
+ - The list contains all objects matching the query filter.
+ - If the filter does not match any object, the list will be empty.
+ returned: always
+ type: list
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.urls import url_argument_spec
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+
+
+# ===========================================
+# Module execution.
+#
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+ # add our own arguments
+ argument_spec.update(
+ url=dict(required=True),
+ query=dict(type="str", required=False, default=""),
+ resolved=dict(type="bool", default=False, choices=[True, False]),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ icinga_object = Icinga2APIObject(module=module, path="/hosts", data=[])
+
+ object_list = icinga_object.query(
+ query=module.params["query"], resolved=module.params["resolved"]
+ )
+ module.exit_json(
+ objects=object_list["data"]["objects"],
+ )
+
+
+# import module snippets
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_host_template.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_host_template.py
new file mode 100644
index 000000000..06e1cc37c
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_host_template.py
@@ -0,0 +1,429 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2020 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_host_template
+short_description: Manage host templates in Icinga2
+description:
+ - Add or remove a host template to Icinga2 through the director API.
+author: Michaela Mattes (@michaelamattes)
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+version_added: '1.2.0'
+notes:
+ - This module supports check mode.
+options:
+ accept_config:
+ choices:
+ - true
+ - false
+ description:
+ - Whether the agent is configured to accept config.
+ type: bool
+ version_added: 1.9.0
+ address:
+ description:
+ - Host address. Usually an IPv4 address, but may be any kind of address your check plugin is able to deal with.
+ type: str
+ address6:
+ description:
+ - Host IPv6 address. Usually an IPv6 address, but may be any kind of address your check plugin is able to deal with.
+ type: str
+ append:
+ choices:
+ - true
+ - false
+ description:
+ - Do not overwrite the whole object but instead append the defined properties.
+ - Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+ - Note - Variables that are set by default will also be applied, even if not set.
+ type: bool
+ version_added: 1.25.0
+ check_command:
+ description:
+ - The name of the check command.
+ - Though this is not required to be defined in the director, you still have to supply a check_command in a host or host-template.
+ type: str
+ check_interval:
+ description:
+ - Your regular check interval.
+ type: str
+ check_period:
+ description:
+ - The name of a time period which determines when this object should be monitored. Not limited by default.
+ type: str
+ check_timeout:
+ description:
+ - Check command timeout in seconds. Overrides the CheckCommand's timeout attribute
+ type: str
+ command_endpoint:
+ description:
+ - The endpoint where commands are executed on.
+ type: str
+ disabled:
+ choices:
+ - true
+ - false
+ default: false
+ description:
+ - Disabled objects will not be deployed.
+ type: bool
+ display_name:
+ description:
+ - Alternative name for this host. Might be a host alias or and kind of string helping your users to identify this host.
+ type: str
+ enable_active_checks:
+ choices:
+ - true
+ - false
+ description:
+ - Whether to actively check this object.
+ type: bool
+ enable_event_handler:
+ choices:
+ - true
+ - false
+ description:
+ - Whether to enable event handlers this object.
+ type: bool
+ enable_flapping:
+ choices:
+ - true
+ - false
+ description:
+ - Whether flap detection is enabled on this object.
+ type: bool
+ enable_notifications:
+ choices:
+ - true
+ - false
+ description:
+ - Whether to send notifications for this object.
+ type: bool
+ enable_passive_checks:
+ choices:
+ - true
+ - false
+ description:
+ - Whether to accept passive check results for this object.
+ type: bool
+ enable_perfdata:
+ choices:
+ - true
+ - false
+ description:
+ - Whether to process performance data provided by this object.
+ type: bool
+ event_command:
+ description:
+ - Event command for host which gets called on every check execution if one of these conditions matches
+ - The host is in a soft state
+ - The host state changes into a hard state
+ - The host state recovers from a soft or hard state to OK/Up
+ type: str
+ flapping_threshold_high:
+ description:
+ - Flapping upper bound in percent for a service to be considered flapping
+ type: str
+ flapping_threshold_low:
+ description:
+ - Flapping lower bound in percent for a service to be considered not flapping
+ type: str
+ groups:
+ default: []
+ description:
+ - Hostgroups that should be directly assigned to this node. Hostgroups can be useful for various reasons.
+ - You might assign service checks based on assigned hostgroup. They are also often used as an instrument to enforce restricted views in Icinga Web 2.
+ - Hostgroups can be directly assigned to single hosts or to host templates.
+ - You might also want to consider assigning hostgroups using apply rules.
+ elements: str
+ type: list
+ has_agent:
+ choices:
+ - true
+ - false
+ description:
+ - Whether this host has the Icinga 2 Agent installed.
+ type: bool
+ version_added: 1.9.0
+ icon_image:
+ description:
+ - An URL pointing to an icon for this object.
+ - Try "tux.png" for icons relative to public/img/icons or "cloud" (no extension) for items from the Icinga icon font
+ type: str
+ icon_image_alt:
+ description:
+ - Alternative text to be shown in case above icon is missing
+ type: str
+ imports:
+ description:
+ - Choose a host-template.
+ elements: str
+ type: list
+ master_should_connect:
+ choices:
+ - true
+ - false
+ description:
+ - Whether the parent (master) node should actively try to connect to this agent.
+ type: bool
+ version_added: 1.9.0
+ max_check_attempts:
+ description:
+ - Defines after how many check attempts a new hard state is reached.
+ type: str
+ notes:
+ description:
+ - Additional notes for this object.
+ type: str
+ version_added: 1.8.0
+ notes_url:
+ description:
+ - An URL pointing to additional notes for this object.
+ - Separate multiple urls like this "'http://url1' 'http://url2'".
+ - Maximum length is 255 characters.
+ type: str
+ version_added: 1.8.0
+ object_name:
+ aliases:
+ - name
+ description:
+ - Icinga object name for this host template.
+ - This is usually a fully qualified host name but it could basically be any kind of string.
+ - To make things easier for your users we strongly suggest to use meaningful names for templates.
+ - For example "generic-host" is ugly, "Standard Linux Server" is easier to understand.
+ required: true
+ type: str
+ retry_interval:
+ description:
+ - Retry interval, will be applied after a state change unless the next hard state is reached.
+ type: str
+ state:
+ choices:
+ - present
+ - absent
+ default: present
+ description:
+ - Apply feature state.
+ type: str
+ vars:
+ description:
+ - Custom properties of the host.
+ type: dict
+ volatile:
+ choices:
+ - true
+ - false
+ description:
+ - Whether this check is volatile.
+ type: bool
+ zone:
+ description:
+ - Set the zone.
+ type: str
+"""
+
+EXAMPLES = """
+- name: Create host template
+ t_systems_mms.icinga_director.icinga_host_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ accept_config: true
+ check_command: hostalive
+ check_interval: 90s
+ check_timeout: 60
+ command_endpoint: fooendpoint
+ disabled: false
+ display_name: foohosttemplate
+ enable_active_checks: true
+ enable_event_handler: false
+ enable_flapping: false
+ enable_notifications: true
+ enable_passive_checks: false
+ enable_perfdata: false
+ flapping_threshold_high: "30.0"
+ flapping_threshold_low: "25.0"
+ has_agent: true
+ icon_image_alt: "alt text"
+ icon_image: "http://url1"
+ master_should_connect: true
+ max_check_attempts: 3
+ object_name: foohosttemplate
+ retry_interval: "1m"
+ volatile: false
+ groups:
+ - "foohostgroup"
+ imports:
+ - ''
+ vars:
+ dnscheck: "no"
+
+- name: Update host template
+ t_systems_mms.icinga_director.icinga_host_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: foohosttemplate
+ notes: "example note"
+ notes_url: "'http://url1' 'http://url2'"
+ append: true
+"""
+
+RETURN = r""" # """
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.urls import url_argument_spec
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+
+
+# ===========================================
+# Module execution.
+#
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+ # add our own arguments
+ argument_spec.update(
+ accept_config=dict(type="bool", choices=[True, False]),
+ address=dict(required=False),
+ address6=dict(required=False),
+ append=dict(type="bool", choices=[True, False]),
+ check_command=dict(required=False),
+ check_interval=dict(required=False),
+ check_period=dict(type="str", required=False),
+ check_timeout=dict(type="str", required=False),
+ command_endpoint=dict(type="str", required=False),
+ disabled=dict(type="bool", default=False, choices=[True, False]),
+ display_name=dict(required=False),
+ enable_active_checks=dict(
+ type="bool", choices=[True, False], required=False
+ ),
+ enable_event_handler=dict(
+ type="bool", choices=[True, False], required=False
+ ),
+ enable_flapping=dict(
+ type="bool", choices=[True, False], required=False
+ ),
+ enable_notifications=dict(
+ type="bool", choices=[True, False], required=False
+ ),
+ enable_passive_checks=dict(
+ type="bool", choices=[True, False], required=False
+ ),
+ enable_perfdata=dict(
+ type="bool", choices=[True, False], required=False
+ ),
+ event_command=dict(type="str", required=False),
+ flapping_threshold_high=dict(type="str", required=False),
+ flapping_threshold_low=dict(type="str", required=False),
+ groups=dict(type="list", elements="str", default=[], required=False),
+ has_agent=dict(type="bool", choices=[True, False]),
+ icon_image_alt=dict(type="str", required=False),
+ icon_image=dict(type="str", required=False),
+ imports=dict(type="list", elements="str", required=False),
+ master_should_connect=dict(type="bool", choices=[True, False]),
+ max_check_attempts=dict(required=False),
+ notes_url=dict(type="str", required=False),
+ notes=dict(type="str", required=False),
+ object_name=dict(required=True, aliases=["name"]),
+ retry_interval=dict(required=False),
+ state=dict(default="present", choices=["absent", "present"]),
+ url=dict(required=True),
+ vars=dict(type="dict", default=None),
+ volatile=dict(type="bool", choices=[True, False], required=False),
+ zone=dict(required=False, default=None),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ data_keys = [
+ "accept_config",
+ "address",
+ "address6",
+ "check_command",
+ "check_interval",
+ "check_period",
+ "check_timeout",
+ "command_endpoint",
+ "disabled",
+ "display_name",
+ "enable_active_checks",
+ "enable_event_handler",
+ "enable_flapping",
+ "enable_notifications",
+ "enable_passive_checks",
+ "enable_perfdata",
+ "event_command",
+ "flapping_threshold_high",
+ "flapping_threshold_low",
+ "groups",
+ "has_agent",
+ "icon_image_alt",
+ "icon_image",
+ "imports",
+ "master_should_connect",
+ "max_check_attempts",
+ "notes_url",
+ "notes",
+ "object_name",
+ "retry_interval",
+ "vars",
+ "volatile",
+ "zone",
+ ]
+
+ data = {}
+
+ if module.params["append"]:
+ for k in data_keys:
+ if module.params[k]:
+ data[k] = module.params[k]
+ else:
+ for k in data_keys:
+ data[k] = module.params[k]
+
+ data["object_type"] = "template"
+
+ icinga_object = Icinga2APIObject(module=module, path="/host", data=data)
+
+ changed, diff = icinga_object.update(module.params["state"])
+ module.exit_json(
+ changed=changed,
+ diff=diff,
+ )
+
+
+# import module snippets
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_host_template_info.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_host_template_info.py
new file mode 100644
index 000000000..0971f2dd5
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_host_template_info.py
@@ -0,0 +1,114 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2021 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_host_template_info
+short_description: Query host templates in Icinga2
+description:
+ - Get a list of host template objects from Icinga2 through the director API.
+author: Martin Schurz (@schurzi)
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+version_added: '1.13.0'
+notes:
+ - This module supports check mode.
+options:
+ query:
+ description:
+ - Text to filter search results.
+ - The text is matched on object_name.
+ - Only objects containing this text will be returned in the resultset.
+ - Requires Icinga Director 1.8.0+, in earlier versions this parameter is ignored and all objects are returned.
+ required: false
+ type: str
+ default: ""
+ resolved:
+ description:
+ - Resolve all inherited object properties and omit templates in output.
+ type: bool
+ default: false
+ choices: [true, false]
+"""
+
+EXAMPLES = """
+- name: Query a host template in icinga
+ t_systems_mms.icinga_director.icinga_host_template_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "foohosttemplate"
+"""
+
+RETURN = r"""
+objects:
+ description:
+ - A list of returned Director objects.
+ - The list contains all objects matching the query filter.
+ - If the filter does not match any object, the list will be empty.
+ returned: always
+ type: list
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.urls import url_argument_spec
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+
+
+# ===========================================
+# Module execution.
+#
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+ # add our own arguments
+ argument_spec.update(
+ url=dict(required=True),
+ query=dict(type="str", required=False, default=""),
+ resolved=dict(type="bool", default=False, choices=[True, False]),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ icinga_object = Icinga2APIObject(
+ module=module, path="/hosts/templates", data=[]
+ )
+
+ object_list = icinga_object.query(
+ query=module.params["query"], resolved=module.params["resolved"]
+ )
+ module.exit_json(
+ objects=object_list["data"]["objects"],
+ )
+
+
+# import module snippets
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_hostgroup.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_hostgroup.py
new file mode 100644
index 000000000..ccf106e95
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_hostgroup.py
@@ -0,0 +1,154 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2020 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_hostgroup
+short_description: Manage hostgroups in Icinga2
+description:
+ - Add or remove a hostgroup to Icinga2 through the director API.
+author: Sebastian Gumprich (@rndmh3ro)
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+version_added: '1.0.0'
+notes:
+ - This module supports check mode.
+options:
+ state:
+ description:
+ - Apply feature state.
+ choices: [ "present", "absent" ]
+ default: present
+ type: str
+ object_name:
+ description:
+ - Icinga object name for this hostgroup.
+ aliases: ['name']
+ required: true
+ type: str
+ display_name:
+ description:
+ - An alternative display name for this group.
+ - If you wonder how this could be helpful just leave it blank.
+ type: str
+ assign_filter:
+ description:
+ - This allows you to configure an assignment filter.
+ - Please feel free to combine as many nested operators as you want.
+ type: str
+ append:
+ description:
+ - Do not overwrite the whole object but instead append the defined properties.
+ - Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+ - Note - Variables that are set by default will also be applied, even if not set.
+ type: bool
+ choices: [true, false]
+ version_added: '1.25.0'
+"""
+
+EXAMPLES = """
+- name: Create hostgroup
+ t_systems_mms.icinga_director.icinga_hostgroup:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: foohostgroup
+ display_name: foohostgroup
+
+- name: Update hostgroup
+ t_systems_mms.icinga_director.icinga_hostgroup:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: foohostgroup
+ assign_filter: 'host.name="foohost"'
+ append: true
+"""
+
+RETURN = r""" # """
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.urls import url_argument_spec
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+
+
+# ===========================================
+# Module execution.
+#
+
+
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+ # add our own arguments
+ argument_spec.update(
+ state=dict(default="present", choices=["absent", "present"]),
+ url=dict(required=True),
+ append=dict(type="bool", choices=[True, False]),
+ object_name=dict(required=True, aliases=["name"]),
+ display_name=dict(required=False),
+ assign_filter=dict(required=False),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ data_keys = [
+ "object_name",
+ "display_name",
+ "assign_filter",
+ ]
+
+ data = {}
+
+ if module.params["append"]:
+ for k in data_keys:
+ if module.params[k]:
+ data[k] = module.params[k]
+ else:
+ for k in data_keys:
+ data[k] = module.params[k]
+
+ data["object_type"] = "object"
+
+ icinga_object = Icinga2APIObject(
+ module=module, path="/hostgroup", data=data
+ )
+
+ changed, diff = icinga_object.update(module.params["state"])
+ module.exit_json(
+ changed=changed,
+ diff=diff,
+ )
+
+
+# import module snippets
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_hostgroup_info.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_hostgroup_info.py
new file mode 100644
index 000000000..27e0b3caa
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_hostgroup_info.py
@@ -0,0 +1,112 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2021 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_hostgroup_info
+short_description: Query hostgroups in Icinga2
+description:
+ - Get a list of hostgroup objects from Icinga2 through the director API.
+author: Martin Schurz (@schurzi)
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+version_added: '1.13.0'
+notes:
+ - This module supports check mode.
+options:
+ query:
+ description:
+ - Text to filter search results.
+ - The text is matched on object_name.
+ - Only objects containing this text will be returned in the resultset.
+ - Requires Icinga Director 1.8.0+, in earlier versions this parameter is ignored and all objects are returned.
+ required: false
+ type: str
+ default: ""
+ resolved:
+ description:
+ - Resolve all inherited object properties and omit templates in output.
+ type: bool
+ default: false
+ choices: [true, false]
+"""
+
+EXAMPLES = """
+- name: Query a hostgroup in icinga
+ t_systems_mms.icinga_director.icinga_hostgroup_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "foohostgroup"
+"""
+
+RETURN = r"""
+objects:
+ description:
+ - A list of returned Director objects.
+ - The list contains all objects matching the query filter.
+ - If the filter does not match any object, the list will be empty.
+ returned: always
+ type: list
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.urls import url_argument_spec
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+
+
+# ===========================================
+# Module execution.
+#
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+ # add our own arguments
+ argument_spec.update(
+ url=dict(required=True),
+ query=dict(type="str", required=False, default=""),
+ resolved=dict(type="bool", default=False, choices=[True, False]),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ icinga_object = Icinga2APIObject(module=module, path="/hostgroups", data=[])
+
+ object_list = icinga_object.query(
+ query=module.params["query"], resolved=module.params["resolved"]
+ )
+ module.exit_json(
+ objects=object_list["data"]["objects"],
+ )
+
+
+# import module snippets
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_notification.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_notification.py
new file mode 100644
index 000000000..48d7df8c2
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_notification.py
@@ -0,0 +1,274 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2020 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_notification
+short_description: Manage notifications in Icinga2
+description:
+ - Add or remove a notification to Icinga2 through the director API.
+author: Sebastian Gumprich (@rndmh3ro) / Sebastian Gruber (sgruber94)
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+version_added: '1.0.0'
+notes:
+ - This module supports check mode.
+options:
+ state:
+ description:
+ - Apply feature state.
+ choices: [ "present", "absent" ]
+ default: present
+ type: str
+ object_name:
+ description:
+ - Name of the notification.
+ aliases: ['name']
+ required: true
+ type: str
+ notification_interval:
+ description:
+ - The notification interval (in seconds). This interval is used for active notifications.
+ - Defaults to 30 minutes. If set to 0, re-notifications are disabled.
+ type: str
+ types:
+ description:
+ - The state transition types you want to get notifications for.
+ type: "list"
+ elements: str
+ users:
+ description:
+ - Users that should be notified by this notification.
+ type: "list"
+ elements: str
+ states:
+ description:
+ - The host or service states you want to get notifications for.
+ type: "list"
+ elements: str
+ version_added: "1.9.0"
+ apply_to:
+ description:
+ - Whether this notification should affect hosts or services.
+ - Required if I(state) is C(present).
+ type: str
+ choices: ["host", "service"]
+ assign_filter:
+ description:
+ - The filter where the notification will take effect.
+ type: "str"
+ imports:
+ description:
+ - Importable templates, add as many as you want. Required when state is C(present).
+ - Please note that order matters when importing properties from multiple templates - last one wins.
+ - Required if I(state) is C(present).
+ type: "list"
+ elements: str
+ disabled:
+ description:
+ - Disabled objects will not be deployed.
+ type: bool
+ default: false
+ choices: [true, false]
+ version_added: "1.9.0"
+ vars:
+ description:
+ - Custom properties of the notification.
+ type: "dict"
+ version_added: "1.9.0"
+ default: {}
+ period:
+ description:
+ - The name of a time period which determines when this notification should be triggered.
+ type: "str"
+ aliases: ['time_period']
+ version_added: "1.15.0"
+ times_begin:
+ description:
+ - First notification delay.
+ - Delay unless the first notification should be sent.
+ type: "int"
+ version_added: "1.15.0"
+ times_end:
+ description:
+ - Last notification.
+ - When the last notification should be sent.
+ type: "int"
+ version_added: "1.15.0"
+ user_groups:
+ description:
+ - User Groups that should be notified by this notification.
+ type: "list"
+ elements: str
+ version_added: '1.16.0'
+ append:
+ description:
+ - Do not overwrite the whole object but instead append the defined properties.
+ - Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+ - Note - Variables that are set by default will also be applied, even if not set.
+ type: bool
+ choices: [true, false]
+ version_added: '1.25.0'
+"""
+
+EXAMPLES = """
+- name: Create notification
+ t_systems_mms.icinga_director.icinga_notification:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ apply_to: host
+ assign_filter: 'host.name="foohost"'
+ imports:
+ - foonotificationtemplate
+ notification_interval: '0'
+ object_name: E-Mail_host
+ states:
+ - Up
+ - Down
+ types:
+ - Problem
+ - Recovery
+ users:
+ - rb
+ user_groups:
+ - OnCall
+ disabled: false
+ time_period: "24/7"
+ times_begin: 20
+ times_end: 120
+
+- name: Update notification
+ t_systems_mms.icinga_director.icinga_notification:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: E-Mail_host
+ vars:
+ foo: bar
+ append: true
+"""
+
+RETURN = r""" # """
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.urls import url_argument_spec
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+
+
+# ===========================================
+# Module execution.
+#
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+
+ # add our own arguments
+ argument_spec.update(
+ state=dict(default="present", choices=["absent", "present"]),
+ url=dict(required=True),
+ append=dict(type="bool", choices=[True, False]),
+ object_name=dict(required=True, aliases=["name"]),
+ imports=dict(type="list", elements="str", required=False),
+ apply_to=dict(choices=["service", "host"]),
+ assign_filter=dict(required=False),
+ disabled=dict(
+ type="bool", required=False, default=False, choices=[True, False]
+ ),
+ notification_interval=dict(required=False),
+ states=dict(type="list", elements="str", required=False),
+ users=dict(type="list", elements="str", required=False),
+ user_groups=dict(type="list", elements="str", required=False),
+ types=dict(type="list", elements="str", required=False),
+ vars=dict(type="dict", default={}, required=False),
+ period=dict(required=False, aliases=["time_period"]),
+ times_begin=dict(type="int", required=False),
+ times_end=dict(type="int", required=False),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ # When deleting objects, only the name is necessary, so we cannot use
+ # required=True in the argument_spec. Instead we define here what is
+ # necessary when state is present and we do not append to an existing object
+ # We cannot use "required_if" here, because we rely on module.params.
+ # These are defined at the same time we'd define the required_if arguments.
+ if (
+ module.params["state"] == "present"
+ and not module.params["append"]
+ and not (module.params["apply_to"] and module.params["imports"])
+ ):
+ module.fail_json(msg="missing required arguments: imports.")
+
+ data_keys = [
+ "object_name",
+ "imports",
+ "apply_to",
+ "disabled",
+ "assign_filter",
+ "notification_interval",
+ "states",
+ "users",
+ "user_groups",
+ "types",
+ "vars",
+ "period",
+ "times_begin",
+ "times_end",
+ ]
+
+ data = {}
+
+ if module.params["append"]:
+ for k in data_keys:
+ if module.params[k]:
+ data[k] = module.params[k]
+ else:
+ for k in data_keys:
+ data[k] = module.params[k]
+
+ data["object_type"] = "apply"
+
+ icinga_object = Icinga2APIObject(
+ module=module, path="/notification", data=data
+ )
+
+ changed, diff = icinga_object.update(module.params["state"])
+ module.exit_json(
+ changed=changed,
+ diff=diff,
+ )
+
+
+# import module snippets
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_notification_info.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_notification_info.py
new file mode 100644
index 000000000..a46a17015
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_notification_info.py
@@ -0,0 +1,114 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2021 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_notification_info
+short_description: Query notifications in Icinga2
+description:
+ - Get a list of notification objects from Icinga2 through the director API.
+author: Martin Schurz (@schurzi)
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+version_added: '1.13.0'
+notes:
+ - This module supports check mode.
+options:
+ query:
+ description:
+ - Text to filter search results.
+ - The text is matched on object_name.
+ - Only objects containing this text will be returned in the resultset.
+ - Requires Icinga Director 1.8.0+, in earlier versions this parameter is ignored and all objects are returned.
+ required: false
+ type: str
+ default: ""
+ resolved:
+ description:
+ - Resolve all inherited object properties and omit templates in output.
+ type: bool
+ default: false
+ choices: [true, false]
+"""
+
+EXAMPLES = """
+- name: Query a notification in icinga
+ t_systems_mms.icinga_director.icinga_notification_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "E-Mail_host"
+"""
+
+RETURN = r"""
+objects:
+ description:
+ - A list of returned Director objects.
+ - The list contains all objects matching the query filter.
+ - If the filter does not match any object, the list will be empty.
+ returned: always
+ type: list
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.urls import url_argument_spec
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+
+
+# ===========================================
+# Module execution.
+#
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+ # add our own arguments
+ argument_spec.update(
+ url=dict(required=True),
+ query=dict(type="str", required=False, default=""),
+ resolved=dict(type="bool", default=False, choices=[True, False]),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ icinga_object = Icinga2APIObject(
+ module=module, path="/notifications/applyrules", data=[]
+ )
+
+ object_list = icinga_object.query(
+ query=module.params["query"], resolved=module.params["resolved"]
+ )
+ module.exit_json(
+ objects=object_list["data"]["objects"],
+ )
+
+
+# import module snippets
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_notification_template.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_notification_template.py
new file mode 100644
index 000000000..ed6d769d0
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_notification_template.py
@@ -0,0 +1,227 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2020 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_notification_template
+short_description: Manage notification templates in Icinga2
+description:
+ - Add or remove a notification template to Icinga2 through the director API.
+author: Sebastian Gumprich (@rndmh3ro) / Sebastian Gruber (sgruber94)
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+version_added: "1.9.0"
+notes:
+ - This module supports check mode.
+options:
+ state:
+ description:
+ - Apply feature state.
+ choices: [ "present", "absent" ]
+ default: present
+ type: str
+ object_name:
+ description:
+ - Name of the notification template.
+ aliases: ['name']
+ required: true
+ type: str
+ notification_interval:
+ description:
+ - The notification interval (in seconds). This interval is used for active notifications.
+ - Defaults to 30 minutes. If set to 0, re-notifications are disabled.
+ type: str
+ types:
+ description:
+ - The state transition types you want to get notifications for.
+ type: "list"
+ elements: str
+ states:
+ description:
+ - The host or service states you want to get notifications for.
+ type: "list"
+ elements: str
+ times_begin:
+ description:
+ - First notification delay.
+ - Delay unless the first notification should be sent.
+ type: "int"
+ times_end:
+ description:
+ - Last notification.
+ - When the last notification should be sent.
+ type: "int"
+ zone:
+ description:
+ - Set the zone.
+ type: str
+ period:
+ description:
+ - The name of a time period which determines when this notification should be triggered.
+ type: "str"
+ aliases: ['time_period']
+ version_added: "1.15.0"
+ command:
+ description:
+ - Check command definition
+ type: "str"
+ aliases: ['notification_command']
+ version_added: "1.15.0"
+ users:
+ description:
+ - Users that should be notified by this notification
+ type: "list"
+ elements: str
+ version_added: "1.15.0"
+ user_groups:
+ description:
+ - User Groups that should be notified by this notification.
+ type: "list"
+ elements: str
+ version_added: '1.16.0'
+ append:
+ description:
+ - Do not overwrite the whole object but instead append the defined properties.
+ - Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+ - Note - Variables that are set by default will also be applied, even if not set.
+ type: bool
+ choices: [true, false]
+ version_added: '1.25.0'
+"""
+
+EXAMPLES = """
+- name: Create notification template
+ t_systems_mms.icinga_director.icinga_notification_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: foonotificationtemplate
+ states:
+ - Up
+ - Down
+ types:
+ - Problem
+ - Recovery
+ times_begin: 20
+ times_end: 120
+ time_period: "24/7"
+ notification_command: "mail-host-notification"
+ users:
+ - "rb"
+ user_groups:
+ - "OnCall"
+ zone: "foozone"
+
+- name: Update notification template
+ t_systems_mms.icinga_director.icinga_notification_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: foonotificationtemplate
+ notification_interval: '0'
+ append: true
+"""
+
+RETURN = r""" # """
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.urls import url_argument_spec
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+
+
+# ===========================================
+# Module execution.
+#
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+
+ # add our own arguments
+ argument_spec.update(
+ state=dict(default="present", choices=["absent", "present"]),
+ url=dict(required=True),
+ append=dict(type="bool", choices=[True, False]),
+ object_name=dict(required=True, aliases=["name"]),
+ notification_interval=dict(required=False),
+ states=dict(type="list", elements="str", required=False),
+ times_begin=dict(type="int", required=False),
+ times_end=dict(type="int", required=False),
+ types=dict(type="list", elements="str", required=False),
+ zone=dict(required=False, default=None),
+ period=dict(required=False, aliases=["time_period"]),
+ command=dict(required=False, aliases=["notification_command"]),
+ users=dict(type="list", elements="str", required=False),
+ user_groups=dict(type="list", elements="str", required=False),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ data_keys = [
+ "object_name",
+ "notification_interval",
+ "states",
+ "times_begin",
+ "times_end",
+ "types",
+ "zone",
+ "period",
+ "command",
+ "users",
+ "user_groups",
+ ]
+
+ data = {}
+
+ if module.params["append"]:
+ for k in data_keys:
+ if module.params[k]:
+ data[k] = module.params[k]
+ else:
+ for k in data_keys:
+ data[k] = module.params[k]
+
+ data["object_type"] = "template"
+
+ icinga_object = Icinga2APIObject(
+ module=module, path="/notification", data=data
+ )
+
+ changed, diff = icinga_object.update(module.params["state"])
+ module.exit_json(
+ changed=changed,
+ diff=diff,
+ )
+
+
+# import module snippets
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_notification_template_info.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_notification_template_info.py
new file mode 100644
index 000000000..4458d1394
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_notification_template_info.py
@@ -0,0 +1,114 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2021 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_notification_template_info
+short_description: Query notification templates in Icinga2
+description:
+ - Get a list of notification template objects from Icinga2 through the director API.
+author: Martin Schurz (@schurzi)
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+version_added: '1.13.0'
+notes:
+ - This module supports check mode.
+options:
+ query:
+ description:
+ - Text to filter search results.
+ - The text is matched on object_name.
+ - Only objects containing this text will be returned in the resultset.
+ - Requires Icinga Director 1.8.0+, in earlier versions this parameter is ignored and all objects are returned.
+ required: false
+ type: str
+ default: ""
+ resolved:
+ description:
+ - Resolve all inherited object properties and omit templates in output.
+ type: bool
+ default: false
+ choices: [true, false]
+"""
+
+EXAMPLES = """
+- name: Query a notification template in icinga
+ t_systems_mms.icinga_director.icinga_notification_template_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "foonotificationtemplate"
+"""
+
+RETURN = r"""
+objects:
+ description:
+ - A list of returned Director objects.
+ - The list contains all objects matching the query filter.
+ - If the filter does not match any object, the list will be empty.
+ returned: always
+ type: list
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.urls import url_argument_spec
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+
+
+# ===========================================
+# Module execution.
+#
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+ # add our own arguments
+ argument_spec.update(
+ url=dict(required=True),
+ query=dict(type="str", required=False, default=""),
+ resolved=dict(type="bool", default=False, choices=[True, False]),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ icinga_object = Icinga2APIObject(
+ module=module, path="/notifications/templates", data=[]
+ )
+
+ object_list = icinga_object.query(
+ query=module.params["query"], resolved=module.params["resolved"]
+ )
+ module.exit_json(
+ objects=object_list["data"]["objects"],
+ )
+
+
+# import module snippets
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_scheduled_downtime.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_scheduled_downtime.py
new file mode 100644
index 000000000..7dbee8938
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_scheduled_downtime.py
@@ -0,0 +1,269 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2020 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_scheduled_downtime
+short_description: Manage downtimes in Icinga2
+description:
+ - Add or remove a downtime to Icinga2 through the director API.
+author: Daniel Uhlmann (@xFuture603)
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+version_added: '1.25.0'
+notes:
+ - This module supports check mode.
+options:
+ state:
+ description:
+ - Apply feature state.
+ choices: [ "present", "absent" ]
+ default: present
+ type: str
+ object_name:
+ description:
+ - Icinga object name for this downtime.
+ aliases: ['name']
+ required: true
+ type: str
+ disabled:
+ description:
+ - Disabled objects will not be deployed.
+ default: false
+ type: bool
+ choices: [true, false]
+ author:
+ description:
+ - Name of the downtime author.
+ - Required if I(state) is C(present).
+ type: str
+ comment:
+ description:
+ - A descriptive comment for the downtime.
+ - Required if I(state) is C(present).
+ type: str
+ fixed:
+ description:
+ - Whether this downtime is fixed or flexible.
+ If unsure please check the related documentation https://icinga.com/docs/icinga2/latest/doc/08-advanced-topics/#downtimes
+ - Required if I(state) is C(present).
+ type: bool
+ choices: [true, false]
+ default: false
+ with_services:
+ description:
+ - Whether you only downtime the hosts or add some services with it.
+ type: bool
+ choices: [true, false]
+ default: true
+ ranges:
+ description:
+ - The period which should be downtimed
+ type: dict
+ default: {}
+ apply_to:
+ description:
+ - Whether this dependency should affect hosts or services
+ - Required if I(state) is C(present).
+ type: str
+ choices: ["host", "service"]
+ assign_filter:
+ description:
+ - The filter where the downtime will take effect.
+ type: str
+ duration:
+ description:
+ - How long the downtime lasts.
+ Only has an effect for flexible (non-fixed) downtimes.
+ Time in seconds, supported suffixes include ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days).
+ To express "90 minutes" you might want to write 1h 30m
+ type: str
+ append:
+ description:
+ - Do not overwrite the whole object but instead append the defined properties.
+ - Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+ - Note - Variables that are set by default will also be applied, even if not set.
+ type: bool
+ choices: [true, false]
+ version_added: '1.25.0'
+"""
+
+EXAMPLES = """
+- name: create icinga_scheduled_downtime
+ t_systems_mms.icinga_director.icinga_scheduled_downtime:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ disabled: false
+ object_name: "foodowntime"
+ state: present
+ author: testuser
+ comment: test
+ fixed: true
+ with_services: true
+ apply_to: host
+ assign_filter: 'host.name="foohost"'
+ duration: 500
+ ranges:
+ "tuesday": "00:00-24:00"
+
+- name: create icinga_scheduled_downtime2
+ t_systems_mms.icinga_director.icinga_scheduled_downtime:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ disabled: false
+ object_name: "foodowntime2"
+ state: present
+ author: testuser
+ comment: test
+ fixed: false
+ with_services: false
+ apply_to: host
+ assign_filter: 'host.name="foohost"'
+ duration: 500
+ ranges:
+ "tuesday": "00:00-24:00"
+
+- name: update icinga_scheduled_downtime2
+ t_systems_mms.icinga_director.icinga_scheduled_downtime:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "foodowntime2"
+ state: present
+ duration: 1000
+ append: true
+ apply_to: host
+ with_services: false
+"""
+
+RETURN = r""" # """
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.urls import url_argument_spec
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+
+
+# ===========================================
+# Module execution.
+#
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+ # add our own arguments
+ argument_spec.update(
+ state=dict(default="present", choices=["absent", "present"]),
+ url=dict(required=True),
+ append=dict(type="bool", choices=[True, False]),
+ object_name=dict(required=True, aliases=["name"]),
+ disabled=dict(type="bool", default=False, choices=[True, False]),
+ apply_to=dict(choices=["host", "service"]),
+ assign_filter=dict(required=False),
+ author={},
+ comment={},
+ duration=dict(required=False),
+ fixed=dict(type="bool", choices=[True, False], default=False),
+ ranges=dict(type="dict", required=False, default={}),
+ with_services=dict(type="bool", default=True, choices=[True, False]),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ # Icinga expects 'y' or 'n' instead of booleans for option "with_services"
+ if module.params["with_services"]:
+ _withservices = "y"
+ else:
+ _withservices = "n"
+
+ # Icinga expects 'yes' or 'no' instead of booleans for option "fixed"
+ if module.params["fixed"]:
+ _fixed = "y"
+ else:
+ _fixed = "n"
+
+ # When deleting objects, only the name is necessary, so we cannot use
+ # required=True in the argument_spec. Instead we define here what is
+ # necessary when state is present and we do not append to an existing object
+ # We cannot use "required_if" here, because we rely on module.params.
+ # These are defined at the same time we'd define the required_if arguments.
+ if (
+ module.params["state"] == "present"
+ and not module.params["append"]
+ and not (
+ module.params["apply_to"]
+ and module.params["author"]
+ and module.params["comment"]
+ and _fixed in ("y", "n")
+ )
+ ):
+ module.fail_json(
+ msg="missing required arguments: apply_to, author, comment, fixed."
+ )
+
+ data_keys = [
+ "object_name",
+ "disabled",
+ "apply_to",
+ "assign_filter",
+ "author",
+ "comment",
+ "duration",
+ "ranges",
+ ]
+
+ data = {}
+
+ if module.params["append"]:
+ for k in data_keys:
+ if module.params[k]:
+ data[k] = module.params[k]
+ else:
+ for k in data_keys:
+ data[k] = module.params[k]
+
+ data["object_type"] = "apply"
+ data["fixed"] = _fixed
+ data["with_services"] = _withservices
+
+ icinga_object = Icinga2APIObject(
+ module=module, path="/scheduled-downtime", data=data
+ )
+
+ changed, diff = icinga_object.update(module.params["state"])
+ module.exit_json(
+ changed=changed,
+ diff=diff,
+ )
+
+
+# import module snippets
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_service.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_service.py
new file mode 100644
index 000000000..2a89203f6
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_service.py
@@ -0,0 +1,409 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2020 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_service
+short_description: Manage services in Icinga2
+description:
+ - Add or remove a service to Icinga2 through the director API.
+author: Sebastian Gumprich (@rndmh3ro)
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+version_added: '1.0.0'
+notes:
+ - This module supports check mode.
+options:
+ state:
+ description:
+ - Apply feature state.
+ choices: [ "present", "absent" ]
+ default: present
+ type: str
+ object_name:
+ description:
+ - Name of the service.
+ aliases: ['name']
+ required: true
+ type: str
+ check_command:
+ description:
+ - Check command definition.
+ type: str
+ check_interval:
+ description:
+ - Your regular check interval.
+ type: str
+ check_period:
+ description:
+ - The name of a time period which determines when this object should be monitored. Not limited by default.
+ type: str
+ check_timeout:
+ description:
+ - Check command timeout in seconds. Overrides the CheckCommand's timeout attribute.
+ type: str
+ display_name:
+ description:
+ - Alternative name for this service.
+ type: str
+ enable_active_checks:
+ description:
+ - Whether to actively check this object.
+ type: "bool"
+ enable_event_handler:
+ description:
+ - Whether to enable event handlers this object.
+ type: "bool"
+ enable_notifications:
+ description:
+ - Whether to send notifications for this object.
+ type: "bool"
+ enable_passive_checks:
+ description:
+ - Whether to accept passive check results for this object.
+ type: "bool"
+ enable_perfdata:
+ description:
+ - Whether to process performance data provided by this object.
+ type: "bool"
+ groups:
+ description:
+ - Service groups that should be directly assigned to this service.
+ - Servicegroups can be useful for various reasons.
+ - They are helpful to provided service-type specific view in Icinga Web 2, either for custom dashboards or as an instrument to enforce restrictions.
+ - Service groups can be directly assigned to single services or to service templates.
+ type: "list"
+ elements: "str"
+ default: []
+ host:
+ description:
+ - Choose the host this single service should be assigned to.
+ - This field will be required when `service_set` is not defined.
+ required: false
+ type: "str"
+ imports:
+ description:
+ - Importable templates, add as many as you want.
+ - Please note that order matters when importing properties from multiple templates - last one wins.
+ type: "list"
+ elements: "str"
+ default: []
+ max_check_attempts:
+ description:
+ - Defines after how many check attempts a new hard state is reached.
+ type: str
+ notes:
+ description:
+ - Additional notes for this object.
+ type: str
+ version_added: '1.8.0'
+ notes_url:
+ description:
+ - An URL pointing to additional notes for this object.
+ - Separate multiple urls like this "'http://url1' 'http://url2'".
+ - Maximum length is 255 characters.
+ type: str
+ version_added: '1.8.0'
+ retry_interval:
+ description:
+ - Retry interval, will be applied after a state change unless the next hard state is reached.
+ type: str
+ use_agent:
+ description:
+ - Whether the check command for this service should be executed on the Icinga agent.
+ type: "bool"
+ vars:
+ description:
+ - Custom properties of the service.
+ type: "dict"
+ default: {}
+ volatile:
+ description:
+ - Whether this check is volatile.
+ type: "bool"
+ disabled:
+ description:
+ - Disabled objects will not be deployed.
+ type: bool
+ default: false
+ choices: [true, false]
+ append:
+ description:
+ - Do not overwrite the whole object but instead append the defined properties.
+ - Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+ - Note - Variables that are set by default will also be applied, even if not set.
+ type: bool
+ choices: [true, false]
+ version_added: '1.25.0'
+ service_set:
+ description:
+ - Choose the service set name this single service should be assigned to.
+ - This field will be required when `host` is not defined.
+ type: str
+ version_added: '1.29.0'
+"""
+
+EXAMPLES = """
+- name: Create service
+ tags: service
+ t_systems_mms.icinga_director.icinga_service:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "foo service"
+ display_name: "foo service"
+ check_command: hostalive
+ use_agent: false
+ host: foohost
+ vars:
+ procs_argument: consul
+ procs_critical: '1:'
+ procs_warning: '1:'
+
+- name: Update service
+ tags: service
+ t_systems_mms.icinga_director.icinga_service:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "foo service"
+ display_name: "foo service"
+ host: foohost
+ notes: "example note"
+ notes_url: "'http://url1' 'http://url2'"
+ append: true
+
+- name: Create serviceset service
+ t_systems_mms.icinga_director.icinga_service:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "foo service serviceset"
+ service_set: "foo_serviceset"
+"""
+
+RETURN = r""" # """
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.urls import url_argument_spec
+from ansible.module_utils.common.text.converters import to_text
+from ansible.module_utils.six.moves.urllib.parse import quote as urlquote
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+import json
+from collections import defaultdict
+
+
+class IcingaServiceObject(Icinga2APIObject):
+ module = None
+
+ def __init__(self, module, path, data):
+ super(IcingaServiceObject, self).__init__(module, path, data)
+ self.module = module
+ self.params = module.params
+ self.path = path
+ self.data = data
+ self.object_id = None
+ # set url parameters when service is assigned to a host
+ if "host" in self.data:
+ if self.data["host"]:
+ param_service_type = "host="
+ param_service_type_filter = to_text(urlquote(self.data["host"]))
+ # set url parameters when service is assigned to a serviceset
+ if "service_set" in self.data:
+ if self.data["service_set"]:
+ param_service_type = "set="
+ param_service_type_filter = to_text(
+ urlquote(self.data["service_set"])
+ )
+
+ self.url = (
+ "/service"
+ + "?"
+ + "name="
+ + to_text(urlquote(self.data["object_name"]))
+ + "&"
+ + param_service_type
+ + param_service_type_filter
+ )
+
+ def exists(self, find_by="name"):
+ ret = super(IcingaServiceObject, self).call_url(path=self.url)
+ self.object_id = to_text(urlquote(self.data["object_name"]))
+ if ret["code"] == 200:
+ return True
+ return False
+
+ def delete(self, find_by="name"):
+ return super(IcingaServiceObject, self).call_url(
+ path=self.url,
+ method="DELETE",
+ )
+
+ def modify(self, find_by="name"):
+ return super(IcingaServiceObject, self).call_url(
+ path=self.url,
+ data=self.module.jsonify(self.data),
+ method="POST",
+ )
+
+ def diff(self, find_by="name"):
+ ret = super(IcingaServiceObject, self).call_url(
+ path=self.url,
+ method="GET",
+ )
+
+ data_from_director = json.loads(self.module.jsonify(ret["data"]))
+ data_from_task = json.loads(self.module.jsonify(self.data))
+
+ diff = defaultdict(dict)
+ for key, value in data_from_director.items():
+ value = self.scrub_diff_value(value)
+ if key in data_from_task.keys() and value != data_from_task[key]:
+ diff["before"][key] = "{val}".format(val=value)
+ diff["after"][key] = "{val}".format(val=data_from_task[key])
+
+ return diff
+
+
+# ===========================================
+# Module execution.
+#
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+ # add our own arguments
+ argument_spec.update(
+ state=dict(default="present", choices=["absent", "present"]),
+ url=dict(required=True),
+ append=dict(type="bool", choices=[True, False]),
+ object_name=dict(required=True, aliases=["name"]),
+ disabled=dict(type="bool", default=False, choices=[True, False]),
+ check_command=dict(required=False),
+ check_interval=dict(required=False),
+ check_period=dict(required=False),
+ check_timeout=dict(required=False),
+ display_name=dict(required=False),
+ enable_active_checks=dict(type="bool", required=False),
+ enable_event_handler=dict(type="bool", required=False),
+ enable_notifications=dict(type="bool", required=False),
+ enable_passive_checks=dict(type="bool", required=False),
+ enable_perfdata=dict(type="bool", required=False),
+ host=dict(type="str", required=False),
+ groups=dict(type="list", elements="str", default=[], required=False),
+ imports=dict(type="list", elements="str", default=[], required=False),
+ max_check_attempts=dict(required=False),
+ notes=dict(type="str", required=False),
+ notes_url=dict(type="str", required=False),
+ retry_interval=dict(required=False),
+ service_set=dict(type="str", required=False),
+ use_agent=dict(type="bool", required=False),
+ vars=dict(type="dict", default={}, required=False),
+ volatile=dict(type="bool", required=False),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ data_keys = [
+ "object_name",
+ "disabled",
+ "check_command",
+ "check_interval",
+ "check_period",
+ "check_timeout",
+ "display_name",
+ "enable_active_checks",
+ "enable_event_handler",
+ "enable_notifications",
+ "enable_passive_checks",
+ "enable_perfdata",
+ "groups",
+ "host",
+ "imports",
+ "max_check_attempts",
+ "notes",
+ "notes_url",
+ "retry_interval",
+ "service_set",
+ "use_agent",
+ "vars",
+ "volatile",
+ ]
+
+ data = {}
+
+ if module.params["append"]:
+ for k in data_keys:
+ if module.params[k]:
+ data[k] = module.params[k]
+ else:
+ for k in data_keys:
+ data[k] = module.params[k]
+
+ data["object_type"] = "object"
+
+ # Only one of "service_set" or "host" needs to be present at the
+ # same time so we cannot use required=True in the argument_spec.
+ # Instead we define here that only one of the two parameters is defined at the same time.
+ if (
+ module.params["state"] == "present"
+ and not module.params["append"]
+ and module.params["host"]
+ and module.params["service_set"]
+ ):
+ module.fail_json(
+ msg="Only one of the properties host or service_set can be defined within the same object."
+ )
+
+ if (
+ module.params["state"] == "present"
+ and not module.params["append"]
+ and not module.params["host"]
+ and not module.params["service_set"]
+ ):
+ module.fail_json(
+ msg="One of the properties host or service_set is required."
+ )
+
+ icinga_object = IcingaServiceObject(
+ module=module, path="/service", data=data
+ )
+
+ changed, diff = icinga_object.update(module.params["state"])
+ module.exit_json(
+ changed=changed,
+ diff=diff,
+ )
+
+
+# import module snippets
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_service_apply.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_service_apply.py
new file mode 100644
index 000000000..5950fd4ed
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_service_apply.py
@@ -0,0 +1,365 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2020 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_service_apply
+short_description: Manage service apply rules in Icinga2
+description:
+ - Add or remove a service apply rule to Icinga2 through the director API.
+author: Sebastian Gumprich (@rndmh3ro)
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+version_added: '1.0.0'
+notes:
+ - This module supports check mode.
+options:
+ state:
+ description:
+ - Apply feature state.
+ choices: [ "present", "absent" ]
+ default: present
+ type: str
+ object_name:
+ description:
+ - Name for the Icinga service apply rule.
+ aliases: ['name']
+ required: true
+ type: str
+ display_name:
+ description:
+ - Alternative displayed name of the service apply rule.
+ type: str
+ check_command:
+ description:
+ - Check command definition.
+ type: str
+ version_added: '1.7.0'
+ check_interval:
+ description:
+ - Your regular check interval.
+ required: false
+ type: str
+ check_period:
+ description:
+ - The name of a time period which determines when this object should be monitored. Not limited by default.
+ required: false
+ type: str
+ check_timeout:
+ description:
+ - Check command timeout in seconds. Overrides the CheckCommand's timeout attribute.
+ required: false
+ type: str
+ enable_active_checks:
+ description:
+ - Whether to actively check this object.
+ required: false
+ type: "bool"
+ enable_event_handler:
+ description:
+ - Whether to enable event handlers this object.
+ required: false
+ type: "bool"
+ enable_notifications:
+ description:
+ - Whether to send notifications for this object.
+ required: false
+ type: "bool"
+ enable_passive_checks:
+ description:
+ - Whether to accept passive check results for this object.
+ required: false
+ type: "bool"
+ enable_perfdata:
+ description:
+ - Whether to process performance data provided by this object.
+ required: false
+ type: "bool"
+ event_command:
+ description:
+ - Event command for service which gets called on every check execution if one of these conditions matches
+ - The service is in a soft state
+ - The service state changes into a hard state
+ - The service state recovers from a soft or hard state to OK/Up
+ required: false
+ type: str
+ max_check_attempts:
+ description:
+ - Defines after how many check attempts a new hard state is reached.
+ required: false
+ type: str
+ retry_interval:
+ description:
+ - Retry interval, will be applied after a state change unless the next hard state is reached.
+ required: false
+ type: str
+ groups:
+ description:
+ - Service groups that should be directly assigned to this service.
+ - Servicegroups can be useful for various reasons.
+ - They are helpful to provided service-type specific view in Icinga Web 2, either for custom dashboards or as an instrument to enforce restrictions.
+ - Service groups can be directly assigned to single services or to service templates.
+ type: "list"
+ elements: str
+ default: []
+ apply_for:
+ description:
+ - Evaluates the apply for rule for all objects with the custom attribute specified.
+ - For example selecting "host.vars.custom_attr" will generate "for (config in host.vars.array_var)" where "config" will be accessible through "$config$".
+ - Note - only custom variables of type "Array" are eligible.
+ type: str
+ assign_filter:
+ description:
+ - The filter where the service apply rule will take effect.
+ type: str
+ command_endpoint:
+ description:
+ - The host where the service should be executed on.
+ type: str
+ imports:
+ description:
+ - Importable templates, add as many as you want.
+ - Please note that order matters when importing properties from multiple templates - last one wins.
+ type: "list"
+ elements: str
+ vars:
+ description:
+ - Custom properties of the service apply rule.
+ type: "dict"
+ default: {}
+ notes:
+ description:
+ - Additional notes for this object.
+ type: str
+ notes_url:
+ description:
+ - An URL pointing to additional notes for this object.
+ - Separate multiple urls like this "'http://url1' 'http://url2'".
+ - Maximum length is 255 characters.
+ type: str
+ append:
+ description:
+ - Do not overwrite the whole object but instead append the defined properties.
+ - Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+ - Note - Variables that are set by default will also be applied, even if not set.
+ type: bool
+ choices: [true, false]
+ version_added: '1.25.0'
+"""
+
+EXAMPLES = """
+- name: Add service apply rule to icinga
+ t_systems_mms.icinga_director.icinga_service_apply:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "SERVICE_dummy"
+ assign_filter: 'host.name="foohost"'
+ check_command: hostalive
+ display_name: "dummy process"
+ check_interval: "10m"
+ check_period: "24/7"
+ check_timeout: "1m"
+ enable_active_checks: true
+ enable_event_handler: true
+ enable_notifications: true
+ enable_passive_checks: false
+ enable_perfdata: false
+ event_command: restart_httpd
+ max_check_attempts: "5"
+ retry_interval: "3m"
+ imports:
+ - fooservicetemplate
+ groups:
+ - fooservicegroup
+ vars:
+ http_address: "$address$"
+ http_port: "9080"
+ http_uri: "/ready"
+ http_string: "Ready"
+ http_expect: "Yes"
+
+- name: Add service apply rule with command_endpoint
+ t_systems_mms.icinga_director.icinga_service_apply:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "SERVICE_dummy"
+ assign_filter: 'host.name="foohost"'
+ check_command: hostalive
+ display_name: "dummy process"
+ check_interval: "10m"
+ check_period: "24/7"
+ check_timeout: "1m"
+ enable_active_checks: true
+ enable_event_handler: true
+ enable_notifications: true
+ enable_passive_checks: false
+ event_command: restart_httpd
+ max_check_attempts: "5"
+ retry_interval: "3m"
+ command_endpoint: "fooendpoint"
+ imports:
+ - fooservicetemplate
+ groups:
+ - fooservicegroup
+
+- name: Update service apply rule with command_endpoint
+ t_systems_mms.icinga_director.icinga_service_apply:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "SERVICE_dummy"
+ enable_perfdata: true
+ append: true
+"""
+
+RETURN = r""" # """
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.urls import url_argument_spec
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+
+
+# ===========================================
+# Icinga2 API class
+#
+class ServiceApplyRule(Icinga2APIObject):
+ def __init__(self, module, data):
+ path = "/service"
+ super(ServiceApplyRule, self).__init__(module, path, data)
+
+ def exists(self):
+ ret = self.call_url(path="/serviceapplyrules")
+ if ret["code"] == 200:
+ for existing_rule in ret["data"]["objects"]:
+ if existing_rule["object_name"] == self.data["object_name"]:
+ self.object_id = existing_rule["id"]
+ return self.object_id
+ return False
+
+ def delete(self):
+ return super(ServiceApplyRule, self).delete(find_by="id")
+
+ def modify(self):
+ return super(ServiceApplyRule, self).modify(find_by="id")
+
+ def diff(self):
+ return super(ServiceApplyRule, self).diff(find_by="id")
+
+
+# ===========================================
+# Module execution.
+#
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+ # add our own arguments
+ argument_spec.update(
+ state=dict(default="present", choices=["absent", "present"]),
+ url=dict(required=True),
+ append=dict(type="bool", choices=[True, False]),
+ object_name=dict(required=True, aliases=["name"]),
+ display_name=dict(required=False),
+ check_command=dict(required=False),
+ check_interval=dict(required=False),
+ check_period=dict(required=False),
+ check_timeout=dict(required=False),
+ enable_active_checks=dict(type="bool", required=False),
+ enable_event_handler=dict(type="bool", required=False),
+ enable_notifications=dict(type="bool", required=False),
+ enable_passive_checks=dict(type="bool", required=False),
+ enable_perfdata=dict(type="bool", required=False),
+ event_command=dict(type="str", required=False),
+ max_check_attempts=dict(required=False),
+ retry_interval=dict(required=False),
+ apply_for=dict(required=False),
+ assign_filter=dict(required=False),
+ command_endpoint=dict(required=False),
+ imports=dict(type="list", elements="str", required=False),
+ groups=dict(type="list", elements="str", default=[], required=False),
+ vars=dict(type="dict", default={}),
+ notes=dict(type="str", required=False),
+ notes_url=dict(type="str", required=False),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ data_keys = [
+ "object_name",
+ "display_name",
+ "apply_for",
+ "check_command",
+ "check_interval",
+ "check_period",
+ "check_timeout",
+ "enable_active_checks",
+ "enable_event_handler",
+ "enable_notifications",
+ "enable_passive_checks",
+ "enable_perfdata",
+ "event_command",
+ "max_check_attempts",
+ "retry_interval",
+ "command_endpoint",
+ "assign_filter",
+ "imports",
+ "groups",
+ "vars",
+ "notes",
+ "notes_url",
+ ]
+
+ data = {}
+
+ if module.params["append"]:
+ for k in data_keys:
+ if module.params[k]:
+ data[k] = module.params[k]
+ else:
+ for k in data_keys:
+ data[k] = module.params[k]
+
+ data["object_type"] = "apply"
+
+ icinga_object = ServiceApplyRule(module=module, data=data)
+
+ changed, diff = icinga_object.update(module.params["state"])
+ module.exit_json(
+ changed=changed,
+ diff=diff,
+ )
+
+
+# import module snippets
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_service_apply_info.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_service_apply_info.py
new file mode 100644
index 000000000..29bcbe361
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_service_apply_info.py
@@ -0,0 +1,115 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2021 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_service_apply_info
+short_description: Query service apply rules in Icinga2
+description:
+ - Get a list of service apply rule objects from Icinga2 through the director API.
+author: Martin Schurz (@schurzi)
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+version_added: '1.13.0'
+notes:
+ - This module supports check mode.
+options:
+ query:
+ description:
+ - Text to filter search results.
+ - The text is matched on object_name.
+ - Only objects containing this text will be returned in the resultset.
+ - Requires Icinga Director 1.8.0+, in earlier versions this parameter is ignored and all objects are returned.
+ required: false
+ type: str
+ default: ""
+ resolved:
+ description:
+ - Resolve all inherited object properties and omit templates in output.
+ type: bool
+ default: false
+ choices: [true, false]
+"""
+
+EXAMPLES = """
+- name: Query a service apply rule in icinga
+ t_systems_mms.icinga_director.icinga_service_apply_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "SERVICE_dummy"
+"""
+
+RETURN = r"""
+objects:
+ description:
+ - A list of returned Director objects.
+ - The list contains all objects matching the query filter.
+ - If the filter does not match any object, the list will be empty.
+ returned: always
+ type: list
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.urls import url_argument_spec
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+
+
+# ===========================================
+# Module execution.
+#
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+ # add our own arguments
+ argument_spec.update(
+ url=dict(required=True),
+ query=dict(type="str", required=False, default=""),
+ resolved=dict(type="bool", default=False, choices=[True, False]),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ icinga_object = Icinga2APIObject(
+ module=module, path="/services/applyrules", data=[]
+ )
+
+ object_list = icinga_object.query(
+ query=module.params["query"], resolved=module.params["resolved"]
+ )
+
+ module.exit_json(
+ objects=object_list["data"]["objects"],
+ )
+
+
+# import module snippets
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_service_info.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_service_info.py
new file mode 100644
index 000000000..c1274c058
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_service_info.py
@@ -0,0 +1,112 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2021 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_service_info
+short_description: Query services in Icinga2
+description:
+ - Get a list of service objects from Icinga2 through the director API.
+author: Martin Schurz (@schurzi)
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+version_added: '1.13.0'
+notes:
+ - This module supports check mode.
+options:
+ query:
+ description:
+ - Text to filter search results.
+ - The text is matched on object_name.
+ - Only objects containing this text will be returned in the resultset.
+ - Requires Icinga Director 1.8.0+, in earlier versions this parameter is ignored and all objects are returned.
+ required: false
+ type: str
+ default: ""
+ resolved:
+ description:
+ - Resolve all inherited object properties and omit templates in output.
+ type: bool
+ default: false
+ choices: [true, false]
+"""
+
+EXAMPLES = """
+- name: Query a service in icinga
+ t_systems_mms.icinga_director.icinga_service_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "foo service"
+"""
+
+RETURN = r"""
+objects:
+ description:
+ - A list of returned Director objects.
+ - The list contains all objects matching the query filter.
+ - If the filter does not match any object, the list will be empty.
+ returned: always
+ type: list
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.urls import url_argument_spec
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+
+
+# ===========================================
+# Module execution.
+#
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+ # add our own arguments
+ argument_spec.update(
+ url=dict(required=True),
+ query=dict(type="str", required=False, default=""),
+ resolved=dict(type="bool", default=False, choices=[True, False]),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ icinga_object = Icinga2APIObject(module=module, path="/services", data=[])
+
+ object_list = icinga_object.query(
+ query=module.params["query"], resolved=module.params["resolved"]
+ )
+ module.exit_json(
+ objects=object_list["data"]["objects"],
+ )
+
+
+# import module snippets
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_service_template.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_service_template.py
new file mode 100644
index 000000000..6f960231c
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_service_template.py
@@ -0,0 +1,327 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2020 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_service_template
+short_description: Manage service templates in Icinga2
+description:
+ - Add or remove a service template to Icinga2 through the director API.
+author: Sebastian Gumprich (@rndmh3ro)
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+version_added: '1.0.0'
+notes:
+ - This module supports check mode.
+options:
+ state:
+ description:
+ - Apply feature state.
+ choices: [ "present", "absent" ]
+ default: present
+ type: str
+ object_name:
+ description:
+ - Name of the service template.
+ aliases: ['name']
+ required: true
+ type: str
+ check_command:
+ description:
+ - Check command definition.
+ type: str
+ check_interval:
+ description:
+ - Your regular check interval.
+ type: str
+ check_period:
+ description:
+ - The name of a time period which determines when this object should be monitored. Not limited by default.
+ type: str
+ check_timeout:
+ description:
+ - Check command timeout in seconds. Overrides the CheckCommand's timeout attribute.
+ type: str
+ enable_active_checks:
+ description:
+ - Whether to actively check this object.
+ type: "bool"
+ enable_event_handler:
+ description:
+ - Whether to enable event handlers this object.
+ type: "bool"
+ enable_flapping:
+ description:
+ - Whether flap detection is enabled on this object.
+ type: bool
+ enable_notifications:
+ description:
+ - Whether to send notifications for this object.
+ type: "bool"
+ enable_passive_checks:
+ description:
+ - Whether to accept passive check results for this object.
+ type: "bool"
+ enable_perfdata:
+ description:
+ - Whether to process performance data provided by this object.
+ type: "bool"
+ event_command:
+ description:
+ - Event command for service which gets called on every check execution if one of these conditions matches
+ - The service is in a soft state
+ - The service state changes into a hard state
+ - The service state recovers from a soft or hard state to OK/Up
+ type: "str"
+ flapping_threshold_high:
+ description:
+ - Flapping upper bound in percent for a service to be considered flapping
+ type: str
+ flapping_threshold_low:
+ description:
+ - Flapping lower bound in percent for a service to be considered not flapping
+ type: str
+ groups:
+ description:
+ - Service groups that should be directly assigned to this service.
+ - Servicegroups can be useful for various reasons.
+ - They are helpful to provided service-type specific view in Icinga Web 2, either for custom dashboards or as an instrument to enforce restrictions.
+ - Service groups can be directly assigned to single services or to service templates.
+ type: "list"
+ elements: "str"
+ default: []
+ icon_image:
+ description:
+ - An URL pointing to an icon for this object.
+ - Try "tux.png" for icons relative to public/img/icons or "cloud" (no extension) for items from the Icinga icon font
+ type: str
+ icon_image_alt:
+ description:
+ - Alternative text to be shown in case above icon is missing
+ type: str
+ imports:
+ description:
+ - Importable templates, add as many as you want.
+ - Please note that order matters when importing properties from multiple templates - last one wins.
+ type: "list"
+ elements: "str"
+ default: []
+ max_check_attempts:
+ description:
+ - Defines after how many check attempts a new hard state is reached.
+ type: str
+ notes:
+ description:
+ - Additional notes for this object.
+ type: str
+ version_added: '1.8.0'
+ notes_url:
+ description:
+ - An URL pointing to additional notes for this object.
+ - Separate multiple urls like this "'http://url1' 'http://url2'".
+ - Maximum length is 255 characters.
+ type: str
+ version_added: '1.8.0'
+ retry_interval:
+ description:
+ - Retry interval, will be applied after a state change unless the next hard state is reached.
+ type: str
+ use_agent:
+ description:
+ - Whether the check command for this service should be executed on the Icinga agent.
+ type: "bool"
+ vars:
+ description:
+ - Custom properties of the service template.
+ type: "dict"
+ default: {}
+ volatile:
+ description:
+ - Whether this check is volatile.
+ type: "bool"
+ disabled:
+ description:
+ - Disabled objects will not be deployed.
+ type: bool
+ default: false
+ choices: [true, false]
+ append:
+ description:
+ - Do not overwrite the whole object but instead append the defined properties.
+ - Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+ - Note - Variables that are set by default will also be applied, even if not set.
+ type: bool
+ choices: [true, false]
+ version_added: '1.25.0'
+"""
+
+EXAMPLES = """
+- name: Create servicetemplate
+ t_systems_mms.icinga_director.icinga_service_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ enable_flapping: true
+ flapping_threshold_high: "30.0"
+ flapping_threshold_low: "25.0"
+ icon_image_alt: "alt text"
+ icon_image: "http://url1"
+ object_name: fooservicetemplate
+ use_agent: false
+ vars:
+ procs_argument: consul
+ procs_critical: '1:'
+ procs_warning: '1:'
+
+- name: Update servicetemplate
+ t_systems_mms.icinga_director.icinga_service_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: fooservicetemplate
+ notes: "example note"
+ notes_url: "'http://url1' 'http://url2'"
+ append: true
+
+- name: Create servicetemplate with event command
+ t_systems_mms.icinga_director.icinga_service_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: apache_check_servicetemplate
+ use_agent: false
+ event_command: restart_httpd
+ notes: "example note"
+ notes_url: "'http://url1' 'http://url2'"
+"""
+
+RETURN = r""" # """
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.urls import url_argument_spec
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+
+
+# ===========================================
+# Module execution.
+#
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+ # add our own arguments
+ argument_spec.update(
+ state=dict(default="present", choices=["absent", "present"]),
+ url=dict(required=True),
+ append=dict(type="bool", choices=[True, False]),
+ object_name=dict(required=True, aliases=["name"]),
+ disabled=dict(type="bool", default=False, choices=[True, False]),
+ check_command=dict(required=False),
+ check_interval=dict(required=False),
+ check_period=dict(required=False),
+ check_timeout=dict(required=False),
+ enable_active_checks=dict(type="bool", required=False),
+ enable_event_handler=dict(type="bool", required=False),
+ enable_flapping=dict(type="bool", required=False),
+ enable_notifications=dict(type="bool", required=False),
+ enable_passive_checks=dict(type="bool", required=False),
+ enable_perfdata=dict(type="bool", required=False),
+ event_command=dict(type="str", required=False),
+ flapping_threshold_high=dict(type="str", required=False),
+ flapping_threshold_low=dict(type="str", required=False),
+ groups=dict(type="list", elements="str", default=[], required=False),
+ icon_image_alt=dict(type="str", required=False),
+ icon_image=dict(type="str", required=False),
+ imports=dict(type="list", elements="str", default=[], required=False),
+ max_check_attempts=dict(required=False),
+ notes=dict(type="str", required=False),
+ notes_url=dict(type="str", required=False),
+ retry_interval=dict(required=False),
+ use_agent=dict(type="bool", required=False),
+ vars=dict(type="dict", default={}, required=False),
+ volatile=dict(type="bool", required=False),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ data_keys = [
+ "object_name",
+ "disabled",
+ "check_command",
+ "check_interval",
+ "check_period",
+ "check_timeout",
+ "enable_active_checks",
+ "enable_event_handler",
+ "enable_flapping",
+ "enable_notifications",
+ "enable_passive_checks",
+ "enable_perfdata",
+ "event_command",
+ "flapping_threshold_high",
+ "flapping_threshold_low",
+ "groups",
+ "icon_image_alt",
+ "icon_image",
+ "imports",
+ "max_check_attempts",
+ "notes",
+ "notes_url",
+ "retry_interval",
+ "use_agent",
+ "vars",
+ "volatile",
+ ]
+
+ data = {}
+
+ if module.params["append"]:
+ for k in data_keys:
+ if module.params[k]:
+ data[k] = module.params[k]
+ else:
+ for k in data_keys:
+ data[k] = module.params[k]
+
+ data["object_type"] = "template"
+
+ icinga_object = Icinga2APIObject(module=module, path="/service", data=data)
+
+ changed, diff = icinga_object.update(module.params["state"])
+ module.exit_json(
+ changed=changed,
+ diff=diff,
+ )
+
+
+# import module snippets
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_service_template_info.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_service_template_info.py
new file mode 100644
index 000000000..f94328130
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_service_template_info.py
@@ -0,0 +1,114 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2021 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_service_template_info
+short_description: Query service templates in Icinga2
+description:
+ - Get a list of service template objects from Icinga2 through the director API.
+author: Martin Schurz (@schurzi)
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+version_added: '1.13.0'
+notes:
+ - This module supports check mode.
+options:
+ query:
+ description:
+ - Text to filter search results.
+ - The text is matched on object_name.
+ - Only objects containing this text will be returned in the resultset.
+ - Requires Icinga Director 1.8.0+, in earlier versions this parameter is ignored and all objects are returned.
+ required: false
+ type: str
+ default: ""
+ resolved:
+ description:
+ - Resolve all inherited object properties and omit templates in output.
+ type: bool
+ default: false
+ choices: [true, false]
+"""
+
+EXAMPLES = """
+- name: Query a service template in icinga
+ t_systems_mms.icinga_director.icinga_service_template_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "fooservicetemplate"
+"""
+
+RETURN = r"""
+objects:
+ description:
+ - A list of returned Director objects.
+ - The list contains all objects matching the query filter.
+ - If the filter does not match any object, the list will be empty.
+ returned: always
+ type: list
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.urls import url_argument_spec
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+
+
+# ===========================================
+# Module execution.
+#
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+ # add our own arguments
+ argument_spec.update(
+ url=dict(required=True),
+ query=dict(type="str", required=False, default=""),
+ resolved=dict(type="bool", default=False, choices=[True, False]),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ icinga_object = Icinga2APIObject(
+ module=module, path="/services/templates", data=[]
+ )
+
+ object_list = icinga_object.query(
+ query=module.params["query"], resolved=module.params["resolved"]
+ )
+ module.exit_json(
+ objects=object_list["data"]["objects"],
+ )
+
+
+# import module snippets
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_servicegroup.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_servicegroup.py
new file mode 100644
index 000000000..98a1dfa9b
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_servicegroup.py
@@ -0,0 +1,154 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2020 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_servicegroup
+short_description: Manage servicegroups in Icinga2
+description:
+ - Add or remove a servicegroup to Icinga2 through the director API.
+author: Sebastian Gumprich (@rndmh3ro)
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+version_added: '1.0.0'
+notes:
+ - This module supports check mode.
+options:
+ state:
+ description:
+ - Apply feature state.
+ choices: [ "present", "absent" ]
+ default: present
+ type: str
+ object_name:
+ description:
+ - Name for the Icinga servicegroup.
+ aliases: ['name']
+ required: true
+ type: str
+ display_name:
+ description:
+ - An alternative display name for this group.
+ - If you wonder how this could be helpful just leave it blank.
+ type: str
+ assign_filter:
+ description:
+ - This allows you to configure an assignment filter.
+ - Please feel free to combine as many nested operators as you want.
+ type: str
+ append:
+ description:
+ - Do not overwrite the whole object but instead append the defined properties.
+ - Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+ - Note - Variables that are set by default will also be applied, even if not set.
+ type: bool
+ choices: [true, false]
+ version_added: '1.25.0'
+"""
+
+EXAMPLES = """
+- name: Create servicegroup
+ t_systems_mms.icinga_director.icinga_servicegroup:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: fooservicegroup
+ assign_filter: 'host.name="foo"'
+
+- name: Update servicegroup
+ t_systems_mms.icinga_director.icinga_servicegroup:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: fooservicegroup
+ display_name: fooservicegroup
+ append: true
+"""
+
+RETURN = r""" # """
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.urls import url_argument_spec
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+
+
+# ===========================================
+# Module execution.
+#
+
+
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+ # add our own arguments
+ argument_spec.update(
+ state=dict(default="present", choices=["absent", "present"]),
+ url=dict(required=True),
+ append=dict(type="bool", choices=[True, False]),
+ object_name=dict(required=True, aliases=["name"]),
+ display_name=dict(required=False),
+ assign_filter=dict(required=False),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ data_keys = [
+ "object_name",
+ "display_name",
+ "assign_filter",
+ ]
+
+ data = {}
+
+ if module.params["append"]:
+ for k in data_keys:
+ if module.params[k]:
+ data[k] = module.params[k]
+ else:
+ for k in data_keys:
+ data[k] = module.params[k]
+
+ data["object_type"] = "object"
+
+ icinga_object = Icinga2APIObject(
+ module=module, path="/servicegroup", data=data
+ )
+
+ changed, diff = icinga_object.update(module.params["state"])
+ module.exit_json(
+ changed=changed,
+ diff=diff,
+ )
+
+
+# import module snippets
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_servicegroup_info.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_servicegroup_info.py
new file mode 100644
index 000000000..7a7ae89e4
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_servicegroup_info.py
@@ -0,0 +1,114 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2021 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_servicegroup_info
+short_description: Query servicegroups in Icinga2
+description:
+ - Get a list of servicegroup objects from Icinga2 through the director API.
+author: Martin Schurz (@schurzi)
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+version_added: '1.13.0'
+notes:
+ - This module supports check mode.
+options:
+ query:
+ description:
+ - Text to filter search results.
+ - The text is matched on object_name.
+ - Only objects containing this text will be returned in the resultset.
+ - Requires Icinga Director 1.8.0+, in earlier versions this parameter is ignored and all objects are returned.
+ required: false
+ type: str
+ default: ""
+ resolved:
+ description:
+ - Resolve all inherited object properties and omit templates in output.
+ type: bool
+ default: false
+ choices: [true, false]
+"""
+
+EXAMPLES = """
+- name: Query a servicegroup in icinga
+ t_systems_mms.icinga_director.icinga_servicegroup_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "fooservicegroup"
+"""
+
+RETURN = r"""
+objects:
+ description:
+ - A list of returned Director objects.
+ - The list contains all objects matching the query filter.
+ - If the filter does not match any object, the list will be empty.
+ returned: always
+ type: list
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.urls import url_argument_spec
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+
+
+# ===========================================
+# Module execution.
+#
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+ # add our own arguments
+ argument_spec.update(
+ url=dict(required=True),
+ query=dict(type="str", required=False, default=""),
+ resolved=dict(type="bool", default=False, choices=[True, False]),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ icinga_object = Icinga2APIObject(
+ module=module, path="/servicegroups", data=[]
+ )
+
+ object_list = icinga_object.query(
+ query=module.params["query"], resolved=module.params["resolved"]
+ )
+ module.exit_json(
+ objects=object_list["data"]["objects"],
+ )
+
+
+# import module snippets
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_serviceset.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_serviceset.py
new file mode 100644
index 000000000..7c7a54582
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_serviceset.py
@@ -0,0 +1,151 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2020 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_serviceset
+short_description: Manage servicesets in Icinga2
+description:
+ - Add or remove a serviceset to Icinga2 through the director API.
+author: Heiko Neblung (@HeikoNeblung)
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+version_added: '1.29.0'
+notes:
+ - This module supports check mode.
+options:
+ append:
+ description:
+ - Do not overwrite the whole object but instead append the defined properties.
+ - Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+ - Note - Variables that are set by default will also be applied, even if not set.
+ type: bool
+ choices: [true, false]
+ assign_filter:
+ description:
+ - This allows you to configure an assignment filter.
+ - Please feel free to combine as many nested operators as you want.
+ type: str
+ description:
+ description:
+ - A meaningful description explaining your users what to expect when assigning this set of services.
+ type: str
+ object_name:
+ description:
+ - Icinga object name for this serviceset.
+ aliases: ['name']
+ required: true
+ type: str
+ state:
+ description:
+ - Apply feature state.
+ choices: [ "present", "absent" ]
+ default: present
+ type: str
+"""
+
+EXAMPLES = """
+- name: Create serviceset
+ t_systems_mms.icinga_director.icinga_serviceset:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "foo_serviceset"
+ assign_filter: 'host.name="foohost"'
+ description: "foo description"
+
+- name: Update serviceset
+ t_systems_mms.icinga_director.icinga_serviceset:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "foo_serviceset"
+ assign_filter: 'host.name="foohost2"'
+ append: true
+"""
+
+RETURN = r""" # """
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.urls import url_argument_spec
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+
+
+# ===========================================
+# Module execution.
+#
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+ # add our own arguments
+ argument_spec.update(
+ append=dict(type="bool", choices=[True, False]),
+ assign_filter=dict(required=False),
+ description=dict(required=False),
+ object_name=dict(required=True, aliases=["name"]),
+ state=dict(default="present", choices=["absent", "present"]),
+ url=dict(required=True),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ data_keys = [
+ "assign_filter",
+ "description",
+ "object_name",
+ ]
+
+ data = {}
+
+ if module.params["append"]:
+ for k in data_keys:
+ if module.params[k]:
+ data[k] = module.params[k]
+ else:
+ for k in data_keys:
+ data[k] = module.params[k]
+
+ data["object_type"] = "template"
+
+ icinga_object = Icinga2APIObject(
+ module=module, path="/serviceSet", data=data
+ )
+
+ changed, diff = icinga_object.update(module.params["state"])
+ module.exit_json(
+ changed=changed,
+ diff=diff,
+ )
+
+
+# import module snippets
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_timeperiod.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_timeperiod.py
new file mode 100644
index 000000000..20c5a6544
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_timeperiod.py
@@ -0,0 +1,168 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2020 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_timeperiod
+short_description: Manage timeperiods in Icinga2
+description:
+ - Add or remove a timeperiod to Icinga2 through the director API.
+author: Sebastian Gumprich (@rndmh3ro)
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+version_added: '1.0.0'
+notes:
+ - This module supports check mode.
+options:
+ state:
+ description:
+ - Apply feature state.
+ choices: [ "present", "absent" ]
+ default: present
+ type: str
+ object_name:
+ description:
+ - Name of the time period.
+ aliases: ['name']
+ required: true
+ type: str
+ display_name:
+ description:
+ - Alternative name for this timeperiod.
+ type: str
+ imports:
+ description:
+ - Importable templates, add as many as you want.
+ - Please note that order matters when importing properties from multiple templates - last one wins.
+ type: list
+ elements: str
+ default: []
+ ranges:
+ description:
+ - A dict of days and timeperiods.
+ type: dict
+ append:
+ description:
+ - Do not overwrite the whole object but instead append the defined properties.
+ - Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+ - Note - Variables that are set by default will also be applied, even if not set.
+ type: bool
+ choices: [true, false]
+ version_added: '1.25.0'
+"""
+
+EXAMPLES = """
+- name: Create timeperiod
+ t_systems_mms.icinga_director.icinga_timeperiod:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: '24/7'
+ imports:
+ - "timeperiod_template"
+ ranges:
+ monday: "00:00-23:59"
+ tuesday: "00:00-23:59"
+ wednesday: "00:00-23:59"
+ thursday: "00:00-23:59"
+ friday: "00:00-23:59"
+ saturday: "00:00-23:59"
+ sunday: "00:00-23:59"
+
+- name: Update timeperiod
+ t_systems_mms.icinga_director.icinga_timeperiod:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: '24/7'
+ display_name: '24/7'
+ append: true
+"""
+
+RETURN = r""" # """
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.urls import url_argument_spec
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+
+
+# ===========================================
+# Module execution.
+#
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+ # add our own arguments
+ argument_spec.update(
+ state=dict(default="present", choices=["absent", "present"]),
+ url=dict(required=True),
+ append=dict(type="bool", choices=[True, False]),
+ object_name=dict(required=True, aliases=["name"]),
+ display_name=dict(required=False),
+ imports=dict(type="list", elements="str", default=[], required=False),
+ ranges=dict(type="dict", required=False),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ data_keys = [
+ "object_name",
+ "display_name",
+ "imports",
+ "ranges",
+ ]
+
+ data = {}
+
+ if module.params["append"]:
+ for k in data_keys:
+ if module.params[k]:
+ data[k] = module.params[k]
+ else:
+ for k in data_keys:
+ data[k] = module.params[k]
+
+ data["object_type"] = "object"
+
+ icinga_object = Icinga2APIObject(
+ module=module, path="/timeperiod", data=data
+ )
+
+ changed, diff = icinga_object.update(module.params["state"])
+ module.exit_json(
+ changed=changed,
+ diff=diff,
+ )
+
+
+# import module snippets
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_timeperiod_info.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_timeperiod_info.py
new file mode 100644
index 000000000..fd6e5068a
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_timeperiod_info.py
@@ -0,0 +1,114 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2021 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_timeperiod_info
+short_description: Query timeperiods in Icinga2
+description:
+ - Get a list of timeperiod objects from Icinga2 through the director API.
+author: Martin Schurz (@schurzi)
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+version_added: '1.13.0'
+notes:
+ - This module supports check mode.
+options:
+ query:
+ description:
+ - Text to filter search results.
+ - The text is matched on object_name.
+ - Only objects containing this text will be returned in the resultset.
+ - Requires Icinga Director 1.8.0+, in earlier versions this parameter is ignored and all objects are returned.
+ required: false
+ type: str
+ default: ""
+ resolved:
+ description:
+ - Resolve all inherited object properties and omit templates in output.
+ type: bool
+ default: false
+ choices: [true, false]
+"""
+
+EXAMPLES = """
+- name: Query a timeperiod in icinga
+ t_systems_mms.icinga_director.icinga_timeperiod_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "24/7"
+"""
+
+RETURN = r"""
+objects:
+ description:
+ - A list of returned Director objects.
+ - The list contains all objects matching the query filter.
+ - If the filter does not match any object, the list will be empty.
+ returned: always
+ type: list
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.urls import url_argument_spec
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+
+
+# ===========================================
+# Module execution.
+#
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+ # add our own arguments
+ argument_spec.update(
+ url=dict(required=True),
+ query=dict(type="str", required=False, default=""),
+ resolved=dict(type="bool", default=False, choices=[True, False]),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ icinga_object = Icinga2APIObject(
+ module=module, path="/timeperiods", data=[]
+ )
+
+ object_list = icinga_object.query(
+ query=module.params["query"], resolved=module.params["resolved"]
+ )
+ module.exit_json(
+ objects=object_list["data"]["objects"],
+ )
+
+
+# import module snippets
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_timeperiod_template.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_timeperiod_template.py
new file mode 100644
index 000000000..978bd6e2e
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_timeperiod_template.py
@@ -0,0 +1,229 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2021 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_timeperiod_template
+short_description: Manage timeperiod templates in Icinga2
+description:
+ - Add or remove a timeperiod template to Icinga2 through the director API.
+author: Sebastian Gumprich (@rndmh3ro)
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+version_added: '1.17.0'
+notes:
+ - This module supports check mode.
+options:
+ state:
+ description:
+ - Apply feature state.
+ choices: [ "present", "absent" ]
+ default: present
+ type: str
+ object_name:
+ description:
+ - Name of the time period.
+ aliases: ['name']
+ required: true
+ type: str
+ display_name:
+ description:
+ - Alternative name for this timeperiod template.
+ type: str
+ disabled:
+ description:
+ - Disabled objects will not be deployed.
+ type: bool
+ default: false
+ choices: [true, false]
+ imports:
+ description:
+ - Importable templates, add as many as you want.
+ - Please note that order matters when importing properties from multiple templates - last one wins.
+ type: list
+ elements: str
+ default: []
+ includes:
+ description:
+ - Include other time periods into this.
+ type: list
+ elements: str
+ aliases: ["include_period"]
+ default: []
+ excludes:
+ description:
+ - Exclude other time periods from this.
+ type: list
+ elements: str
+ aliases: ["exclude_period"]
+ default: []
+ prefer_includes:
+ description:
+ - Whether to prefer timeperiods includes or excludes. Default to true.
+ type: bool
+ default: true
+ choices: [true, false]
+ ranges:
+ description:
+ - A dict of days and timeperiods.
+ type: dict
+ zone:
+ description:
+ - Set the zone.
+ type: str
+ update_method:
+ description:
+ - Define the update method.
+ type: str
+ default: "LegacyTimePeriod"
+ append:
+ description:
+ - Do not overwrite the whole object but instead append the defined properties.
+ - Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+ - Note - Variables that are set by default will also be applied, even if not set.
+ type: bool
+ choices: [true, false]
+ version_added: '1.25.0'
+"""
+
+EXAMPLES = """
+- name: Create timeperiod template
+ t_systems_mms.icinga_director.icinga_timeperiod_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "timeperiod_template"
+ imports: []
+ disabled: false
+ prefer_includes: false
+ ranges:
+ monday: "00:00-23:59"
+ tuesday: "00:00-23:59"
+ wednesday: "00:00-23:59"
+ thursday: "00:00-23:59"
+ friday: "00:00-23:59"
+ saturday: "00:00-23:59"
+ sunday: "00:00-23:59"
+ update_method: "LegacyTimePeriod"
+
+- name: Update timeperiod template
+ t_systems_mms.icinga_director.icinga_timeperiod_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "timeperiod_template"
+ display_name: "timeperiod template"
+ append: true
+"""
+
+RETURN = r""" # """
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.urls import url_argument_spec
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+
+
+# ===========================================
+# Module execution.
+#
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+ # add our own arguments
+ argument_spec.update(
+ state=dict(default="present", choices=["absent", "present"]),
+ url=dict(required=True),
+ append=dict(type="bool", choices=[True, False]),
+ object_name=dict(required=True, aliases=["name"]),
+ display_name=dict(required=False),
+ disabled=dict(type="bool", default=False, choices=[True, False]),
+ zone=dict(required=False, default=None),
+ imports=dict(type="list", elements="str", default=[], required=False),
+ ranges=dict(type="dict", required=False),
+ prefer_includes=dict(type="bool", default=True, choices=[True, False]),
+ excludes=dict(
+ type="list",
+ elements="str",
+ default=[],
+ required=False,
+ aliases=["exclude_period"],
+ ),
+ includes=dict(
+ type="list",
+ elements="str",
+ default=[],
+ required=False,
+ aliases=["include_period"],
+ ),
+ update_method=dict(required=False, default="LegacyTimePeriod"),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ data_keys = [
+ "object_name",
+ "display_name",
+ "disabled",
+ "zone",
+ "imports",
+ "ranges",
+ "prefer_includes",
+ "excludes",
+ "includes",
+ "update_method",
+ ]
+
+ data = {}
+
+ if module.params["append"]:
+ for k in data_keys:
+ if module.params[k]:
+ data[k] = module.params[k]
+ else:
+ for k in data_keys:
+ data[k] = module.params[k]
+
+ data["object_type"] = "template"
+
+ icinga_object = Icinga2APIObject(
+ module=module, path="/timeperiod", data=data
+ )
+
+ changed, diff = icinga_object.update(module.params["state"])
+ module.exit_json(
+ changed=changed,
+ diff=diff,
+ )
+
+
+# import module snippets
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_timeperiod_template_info.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_timeperiod_template_info.py
new file mode 100644
index 000000000..cb3bf21d4
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_timeperiod_template_info.py
@@ -0,0 +1,114 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2021 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_timeperiod_template_info
+short_description: Query timeperiod templates in Icinga2
+description:
+ - Get a list of timeperiod template objects from Icinga2 through the director API.
+author: Sebastian Gumprich (@rndmh3ro)
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+version_added: '1.17.0'
+notes:
+ - This module supports check mode.
+options:
+ query:
+ description:
+ - Text to filter search results.
+ - The text is matched on object_name.
+ - Only objects containing this text will be returned in the resultset.
+ - Requires Icinga Director 1.8.0+, in earlier versions this parameter is ignored and all objects are returned.
+ required: false
+ type: str
+ default: ""
+ resolved:
+ description:
+ - Resolve all inherited object properties and omit templates in output.
+ type: bool
+ default: false
+ choices: [true, false]
+"""
+
+EXAMPLES = """
+- name: Query a timeperiod template in icinga
+ t_systems_mms.icinga_director.icinga_timeperiod_template_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "timeperiod_template"
+"""
+
+RETURN = r"""
+objects:
+ description:
+ - A list of returned Director objects.
+ - The list contains all objects matching the query filter.
+ - If the filter does not match any object, the list will be empty.
+ returned: always
+ type: list
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.urls import url_argument_spec
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+
+
+# ===========================================
+# Module execution.
+#
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+ # add our own arguments
+ argument_spec.update(
+ url=dict(required=True),
+ query=dict(type="str", required=False, default=""),
+ resolved=dict(type="bool", default=False, choices=[True, False]),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ icinga_object = Icinga2APIObject(
+ module=module, path="/timeperiods/templates", data=[]
+ )
+
+ object_list = icinga_object.query(
+ query=module.params["query"], resolved=module.params["resolved"]
+ )
+ module.exit_json(
+ objects=object_list["data"]["objects"],
+ )
+
+
+# import module snippets
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_user.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_user.py
new file mode 100644
index 000000000..ae41a8fbc
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_user.py
@@ -0,0 +1,191 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2020 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_user
+short_description: Manage users in Icinga2
+description:
+ - Add or remove a user to Icinga2 through the director API.
+author: Sebastian Gumprich (@rndmh3ro)
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+version_added: '1.0.0'
+notes:
+ - This module supports check mode.
+options:
+ state:
+ description:
+ - Apply feature state.
+ choices: [ "present", "absent" ]
+ default: present
+ type: str
+ object_name:
+ description:
+ - Name of the user.
+ aliases: ['name']
+ required: true
+ type: str
+ display_name:
+ description:
+ - Alternative name for this user.
+ - In case your object name is a username, this could be the full name of the corresponding person.
+ type: str
+ imports:
+ description:
+ - Importable templates, add as many as you want.
+ - Please note that order matters when importing properties from multiple templates - last one wins.
+ type: list
+ elements: str
+ pager:
+ description:
+ - The pager address of the user.
+ type: str
+ period:
+ description:
+ - The name of a time period which determines when notifications to this User should be triggered. Not set by default.
+ type: str
+ disabled:
+ description:
+ - Disabled objects will not be deployed.
+ type: bool
+ default: false
+ choices: [true, false]
+ email:
+ description:
+ - The Email address of the user.
+ type: str
+ groups:
+ description:
+ - User groups that should be directly assigned to this user.
+ - Groups can be useful for various reasons. You might prefer to send notifications to groups instead of single users.
+ type: list
+ elements: str
+ append:
+ description:
+ - Do not overwrite the whole object but instead append the defined properties.
+ - Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+ - Note - Variables that are set by default will also be applied, even if not set.
+ type: bool
+ choices: [true, false]
+ version_added: '1.25.0'
+"""
+
+EXAMPLES = """
+- name: Create user
+ t_systems_mms.icinga_director.icinga_user:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "rb"
+ pager: 'SIP/emergency'
+ period: '24/7'
+ email: "foouser@example.com"
+ imports:
+ - foousertemplate
+ groups:
+ - onCall
+
+- name: Update user
+ t_systems_mms.icinga_director.icinga_user:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "rb"
+ display_name: "Rufbereitschaft"
+ append: true
+"""
+
+RETURN = r""" # """
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.urls import url_argument_spec
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+
+
+# ===========================================
+# Module execution.
+#
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+ # add our own arguments
+ argument_spec.update(
+ state=dict(default="present", choices=["absent", "present"]),
+ url=dict(required=True),
+ append=dict(type="bool", choices=[True, False]),
+ object_name=dict(required=True, aliases=["name"]),
+ display_name=dict(required=False),
+ disabled=dict(type="bool", default=False, choices=[True, False]),
+ imports=dict(type="list", elements="str", required=False),
+ email=dict(required=False),
+ pager=dict(required=False),
+ period=dict(required=False),
+ groups=dict(type="list", elements="str", required=False),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ data_keys = [
+ "object_name",
+ "display_name",
+ "imports",
+ "disabled",
+ "email",
+ "pager",
+ "period",
+ "groups",
+ ]
+
+ data = {}
+
+ if module.params["append"]:
+ for k in data_keys:
+ if module.params[k]:
+ data[k] = module.params[k]
+ else:
+ for k in data_keys:
+ data[k] = module.params[k]
+
+ data["object_type"] = "object"
+
+ icinga_object = Icinga2APIObject(module=module, path="/user", data=data)
+
+ changed, diff = icinga_object.update(module.params["state"])
+ module.exit_json(
+ changed=changed,
+ diff=diff,
+ )
+
+
+# import module snippets
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_user_group.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_user_group.py
new file mode 100644
index 000000000..82c3bdb39
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_user_group.py
@@ -0,0 +1,153 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2021 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_user_group
+short_description: Manage users groups in Icinga2
+description:
+ - Add or remove a user group to Icinga2 through the director API.
+author: Sebastian Gumprich (@rndmh3ro)
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+version_added: '1.16.0'
+notes:
+ - This module supports check mode.
+options:
+ state:
+ description:
+ - Apply feature state.
+ choices: [ "present", "absent" ]
+ default: present
+ type: str
+ object_name:
+ description:
+ - Name of the user group.
+ aliases: ['name']
+ required: true
+ type: str
+ display_name:
+ description:
+ - Alternative name for this user group.
+ - In case your object name is a username, this could be the full name of the corresponding person.
+ type: str
+ disabled:
+ description:
+ - Disabled objects will not be deployed.
+ type: bool
+ default: false
+ choices: [true, false]
+ append:
+ description:
+ - Do not overwrite the whole object but instead append the defined properties.
+ - Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+ - Note - Variables that are set by default will also be applied, even if not set.
+ type: bool
+ choices: [true, false]
+ version_added: '1.25.0'
+"""
+
+EXAMPLES = """
+- name: Create user group
+ t_systems_mms.icinga_director.icinga_user_group:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "onCall"
+ disabled: false
+
+- name: Update user group
+ t_systems_mms.icinga_director.icinga_user_group:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "onCall"
+ display_name: "on call group"
+ append: true
+"""
+
+RETURN = r""" # """
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.urls import url_argument_spec
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+
+
+# ===========================================
+# Module execution.
+#
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+ # add our own arguments
+ argument_spec.update(
+ state=dict(default="present", choices=["absent", "present"]),
+ url=dict(required=True),
+ append=dict(type="bool", choices=[True, False]),
+ object_name=dict(required=True, aliases=["name"]),
+ display_name=dict(required=False),
+ disabled=dict(type="bool", default=False, choices=[True, False]),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ data_keys = [
+ "object_name",
+ "display_name",
+ "disabled",
+ ]
+
+ data = {}
+
+ if module.params["append"]:
+ for k in data_keys:
+ if module.params[k]:
+ data[k] = module.params[k]
+ else:
+ for k in data_keys:
+ data[k] = module.params[k]
+
+ data["object_type"] = "object"
+
+ icinga_object = Icinga2APIObject(
+ module=module, path="/usergroup", data=data
+ )
+
+ changed, diff = icinga_object.update(module.params["state"])
+ module.exit_json(
+ changed=changed,
+ diff=diff,
+ )
+
+
+# import module snippets
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_user_group_info.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_user_group_info.py
new file mode 100644
index 000000000..1f3ebfe97
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_user_group_info.py
@@ -0,0 +1,112 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2021 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_user_group_info
+short_description: Query user groups in Icinga2
+description:
+ - Get a list of user group objects from Icinga2 through the director API.
+author: Sebastian Gumprich (@rndmh3ro)
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+version_added: '1.16.0'
+notes:
+ - This module supports check mode.
+options:
+ query:
+ description:
+ - Text to filter search results.
+ - The text is matched on object_name.
+ - Only objects containing this text will be returned in the resultset.
+ - Requires Icinga Director 1.8.0+, in earlier versions this parameter is ignored and all objects are returned.
+ required: false
+ type: str
+ default: ""
+ resolved:
+ description:
+ - Resolve all inherited object properties and omit templates in output.
+ type: bool
+ default: false
+ choices: [true, false]
+"""
+
+EXAMPLES = """
+- name: Query a user group in icinga
+ t_systems_mms.icinga_director.icinga_user_group_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "onCall"
+"""
+
+RETURN = r"""
+objects:
+ description:
+ - A list of returned Director objects.
+ - The list contains all objects matching the query filter.
+ - If the filter does not match any object, the list will be empty.
+ returned: always
+ type: list
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.urls import url_argument_spec
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+
+
+# ===========================================
+# Module execution.
+#
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+ # add our own arguments
+ argument_spec.update(
+ url=dict(required=True),
+ query=dict(type="str", required=False, default=""),
+ resolved=dict(type="bool", default=False, choices=[True, False]),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ icinga_object = Icinga2APIObject(module=module, path="/usergroups", data=[])
+
+ object_list = icinga_object.query(
+ query=module.params["query"], resolved=module.params["resolved"]
+ )
+ module.exit_json(
+ objects=object_list["data"]["objects"],
+ )
+
+
+# import module snippets
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_user_info.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_user_info.py
new file mode 100644
index 000000000..87fc62669
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_user_info.py
@@ -0,0 +1,112 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2021 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_user_info
+short_description: Query users in Icinga2
+description:
+ - Get a list of user objects from Icinga2 through the director API.
+author: Martin Schurz (@schurzi)
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+version_added: '1.13.0'
+notes:
+ - This module supports check mode.
+options:
+ query:
+ description:
+ - Text to filter search results.
+ - The text is matched on object_name.
+ - Only objects containing this text will be returned in the resultset.
+ - Requires Icinga Director 1.8.0+, in earlier versions this parameter is ignored and all objects are returned.
+ required: false
+ type: str
+ default: ""
+ resolved:
+ description:
+ - Resolve all inherited object properties and omit templates in output.
+ type: bool
+ default: false
+ choices: [true, false]
+"""
+
+EXAMPLES = """
+- name: Query a user in icinga
+ t_systems_mms.icinga_director.icinga_user_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "rb"
+"""
+
+RETURN = r"""
+objects:
+ description:
+ - A list of returned Director objects.
+ - The list contains all objects matching the query filter.
+ - If the filter does not match any object, the list will be empty.
+ returned: always
+ type: list
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.urls import url_argument_spec
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+
+
+# ===========================================
+# Module execution.
+#
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+ # add our own arguments
+ argument_spec.update(
+ url=dict(required=True),
+ query=dict(type="str", required=False, default=""),
+ resolved=dict(type="bool", default=False, choices=[True, False]),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ icinga_object = Icinga2APIObject(module=module, path="/users", data=[])
+
+ object_list = icinga_object.query(
+ query=module.params["query"], resolved=module.params["resolved"]
+ )
+ module.exit_json(
+ objects=object_list["data"]["objects"],
+ )
+
+
+# import module snippets
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_user_template.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_user_template.py
new file mode 100644
index 000000000..6a088107e
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_user_template.py
@@ -0,0 +1,165 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2020 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_user_template
+short_description: Manage user templates in Icinga2
+description:
+ - Add or remove a user template to Icinga2 through the director API.
+author: Lars Krahl (@mmslkr)
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+version_added: '1.0.0'
+notes:
+ - This module supports check mode.
+options:
+ state:
+ description:
+ - Apply feature state.
+ choices: [ "present", "absent" ]
+ default: present
+ type: str
+ object_name:
+ description:
+ - Name of the user template.
+ aliases: ['name']
+ required: true
+ type: str
+ imports:
+ description:
+ - Importable templates, add as many as you want.
+ - Please note that order matters when importing properties from multiple templates - last one wins.
+ type: list
+ elements: str
+ default: []
+ period:
+ description:
+ - The name of a time period which determines when notifications to this User should be triggered. Not set by default.
+ type: str
+ enable_notifications:
+ description:
+ - Whether to send notifications for this user.
+ type: bool
+ zone:
+ description:
+ - Set the zone.
+ type: str
+ append:
+ description:
+ - Do not overwrite the whole object but instead append the defined properties.
+ - Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+ - Note - Variables that are set by default will also be applied, even if not set.
+ type: bool
+ choices: [true, false]
+ version_added: '1.25.0'
+"""
+
+EXAMPLES = """
+- name: Create user template
+ t_systems_mms.icinga_director.icinga_user_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "foousertemplate"
+ enable_notifications: false
+ period: '24/7'
+ zone: "foozone"
+
+- name: Update user template
+ t_systems_mms.icinga_director.icinga_user_template:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "foousertemplate"
+ enable_notifications: true
+ append: true
+"""
+
+RETURN = r""" # """
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.urls import url_argument_spec
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+
+
+# ===========================================
+# Module execution.
+#
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+ # add our own arguments
+ argument_spec.update(
+ state=dict(default="present", choices=["absent", "present"]),
+ url=dict(required=True),
+ append=dict(type="bool", choices=[True, False]),
+ object_name=dict(required=True, aliases=["name"]),
+ imports=dict(type="list", elements="str", default=[], required=False),
+ period=dict(required=False),
+ enable_notifications=dict(type="bool", required=False),
+ zone=dict(required=False, default=None),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ data_keys = [
+ "object_name",
+ "imports",
+ "period",
+ "enable_notifications",
+ "zone",
+ ]
+
+ data = {}
+
+ if module.params["append"]:
+ for k in data_keys:
+ if module.params[k]:
+ data[k] = module.params[k]
+ else:
+ for k in data_keys:
+ data[k] = module.params[k]
+
+ data["object_type"] = "template"
+
+ icinga_object = Icinga2APIObject(module=module, path="/user", data=data)
+
+ changed, diff = icinga_object.update(module.params["state"])
+ module.exit_json(
+ changed=changed,
+ diff=diff,
+ )
+
+
+# import module snippets
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_user_template_info.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_user_template_info.py
new file mode 100644
index 000000000..9a72fd9cf
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_user_template_info.py
@@ -0,0 +1,114 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2021 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_user_template_info
+short_description: Query user templates in Icinga2
+description:
+ - Get a list of user template objects from Icinga2 through the director API.
+author: Martin Schurz (@schurzi)
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+version_added: '1.13.0'
+notes:
+ - This module supports check mode.
+options:
+ query:
+ description:
+ - Text to filter search results.
+ - The text is matched on object_name.
+ - Only objects containing this text will be returned in the resultset.
+ - Requires Icinga Director 1.8.0+, in earlier versions this parameter is ignored and all objects are returned.
+ required: false
+ type: str
+ default: ""
+ resolved:
+ description:
+ - Resolve all inherited object properties and omit templates in output.
+ type: bool
+ default: false
+ choices: [true, false]
+"""
+
+EXAMPLES = """
+- name: Query a user template in icinga
+ t_systems_mms.icinga_director.icinga_user_template_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "foousertemplate"
+"""
+
+RETURN = r"""
+objects:
+ description:
+ - A list of returned Director objects.
+ - The list contains all objects matching the query filter.
+ - If the filter does not match any object, the list will be empty.
+ returned: always
+ type: list
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.urls import url_argument_spec
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+
+
+# ===========================================
+# Module execution.
+#
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+ # add our own arguments
+ argument_spec.update(
+ url=dict(required=True),
+ query=dict(type="str", required=False, default=""),
+ resolved=dict(type="bool", default=False, choices=[True, False]),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ icinga_object = Icinga2APIObject(
+ module=module, path="/users/templates", data=[]
+ )
+
+ object_list = icinga_object.query(
+ query=module.params["query"], resolved=module.params["resolved"]
+ )
+ module.exit_json(
+ objects=object_list["data"]["objects"],
+ )
+
+
+# import module snippets
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_zone.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_zone.py
new file mode 100644
index 000000000..296b2abfa
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_zone.py
@@ -0,0 +1,151 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2020 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_zone
+short_description: Manage zones in Icinga2
+description:
+ - Add or remove a zone to Icinga2 through the director API.
+author: Aaron Bulmahn (@arbu)
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+version_added: '1.5.0'
+notes:
+ - This module supports check mode.
+options:
+ state:
+ description:
+ - Apply feature state.
+ choices: [ "present", "absent" ]
+ default: present
+ type: str
+ object_name:
+ description:
+ - Icinga object name for this zone.
+ - This is usually a fully qualified host name but it could basically be any kind of string.
+ - To make things easier for your users we strongly suggest to use meaningful names for templates.
+ - For example "generic-zone" is ugly, "Standard Linux Server" is easier to understand.
+ aliases: ['name']
+ required: true
+ type: str
+ is_global:
+ description:
+ - Whether configuration files for this zone should be synced to all endpoints.
+ default: false
+ type: bool
+ parent:
+ description:
+ - The name of the parent zone.
+ type: str
+ append:
+ description:
+ - Do not overwrite the whole object but instead append the defined properties.
+ - Note - Appending to existing vars, imports or any other list/dict is not possible. You have to overwrite the complete list/dict.
+ - Note - Variables that are set by default will also be applied, even if not set.
+ type: bool
+ choices: [true, false]
+ version_added: '1.25.0'
+"""
+
+EXAMPLES = """
+- name: Create a zone in icinga
+ t_systems_mms.icinga_director.icinga_zone:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "foozone"
+
+- name: Update a zone in icinga
+ t_systems_mms.icinga_director.icinga_zone:
+ state: present
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ object_name: "foozone"
+ parent: "master"
+ append: true
+"""
+
+RETURN = r""" # """
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.urls import url_argument_spec
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+
+
+# ===========================================
+# Module execution.
+#
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+ # add our own arguments
+ argument_spec.update(
+ state=dict(default="present", choices=["absent", "present"]),
+ url=dict(required=True),
+ append=dict(type="bool", choices=[True, False]),
+ object_name=dict(required=True, aliases=["name"]),
+ is_global=dict(required=False, type="bool", default=False),
+ parent=dict(required=False),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ data_keys = [
+ "object_name",
+ "is_global",
+ "parent",
+ ]
+
+ data = {}
+
+ if module.params["append"]:
+ for k in data_keys:
+ if module.params[k]:
+ data[k] = module.params[k]
+ else:
+ for k in data_keys:
+ data[k] = module.params[k]
+
+ data["object_type"] = "object"
+
+ icinga_object = Icinga2APIObject(module=module, path="/zone", data=data)
+
+ changed, diff = icinga_object.update(module.params["state"])
+ module.exit_json(
+ changed=changed,
+ diff=diff,
+ )
+
+
+# import module snippets
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_zone_info.py b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_zone_info.py
new file mode 100644
index 000000000..dd2bbd02e
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/plugins/modules/icinga_zone_info.py
@@ -0,0 +1,127 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2021 T-Systems Multimedia Solutions GmbH
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+module: icinga_zone_info
+short_description: Query zones in Icinga2
+description:
+ - Get a list of zone objects from Icinga2 through the director API.
+author: Martin Schurz (@schurzi)
+extends_documentation_fragment:
+ - ansible.builtin.url
+ - t_systems_mms.icinga_director.common_options
+version_added: '1.13.0'
+notes:
+ - This module supports check mode.
+options:
+ query:
+ description:
+ - Text to filter search results.
+ - The text is matched on object_name.
+ - Only objects containing this text will be returned in the resultset.
+ - Requires Icinga Director 1.8.0+, in earlier versions this parameter is ignored and all objects are returned.
+ required: false
+ type: str
+ default: ""
+ resolved:
+ description:
+ - Resolve all inherited object properties and omit templates in output.
+ type: bool
+ default: false
+ choices: [true, false]
+ external:
+ description:
+ - Also include external objects in output.
+ type: bool
+ default: false
+ choices: [true, false]
+"""
+
+EXAMPLES = """
+- name: Query a zone in icinga
+ t_systems_mms.icinga_director.icinga_zone_info:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ query: "foozone"
+"""
+
+RETURN = r"""
+objects:
+ description:
+ - A list of returned Director objects.
+ - The list contains all objects matching the query filter.
+ - If the filter does not match any object, the list will be empty.
+ returned: always
+ type: list
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.urls import url_argument_spec
+from ansible_collections.t_systems_mms.icinga_director.plugins.module_utils.icinga import (
+ Icinga2APIObject,
+)
+
+
+# ===========================================
+# Module execution.
+#
+def main():
+ # use the predefined argument spec for url
+ argument_spec = url_argument_spec()
+ # add our own arguments
+ argument_spec.update(
+ url=dict(required=True),
+ query=dict(type="str", required=False, default=""),
+ resolved=dict(type="bool", default=False, choices=[True, False]),
+ external=dict(type="bool", default=False, choices=[True, False]),
+ )
+
+ # Define the main module
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ icinga_object = Icinga2APIObject(module=module, path="/zones", data=[])
+
+ object_list = icinga_object.query(
+ query=module.params["query"], resolved=module.params["resolved"]
+ )
+
+ filtered_list = object_list["data"]["objects"]
+
+ if not module.params["external"]:
+ filtered_list = [
+ i for i in filtered_list if i["object_type"] != "external_object"
+ ]
+
+ module.exit_json(
+ objects=filtered_list,
+ )
+
+
+# import module snippets
+if __name__ == "__main__":
+ main()
diff --git a/ansible_collections/t_systems_mms/icinga_director/renovate.json b/ansible_collections/t_systems_mms/icinga_director/renovate.json
new file mode 100644
index 000000000..128d31e66
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/renovate.json
@@ -0,0 +1,14 @@
+{
+ "extends": [
+ "config:base"
+ ],
+ "packageRules": [
+ {
+ "matchUpdateTypes": ["minor", "patch", "pin", "digest"],
+ "matchManagers": ["github-actions"],
+ "automerge": true,
+ "automergeType": "branch"
+ }
+ ]
+}
+
diff --git a/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/README.md b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/README.md
new file mode 100644
index 000000000..e9fdf499a
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/README.md
@@ -0,0 +1,263 @@
+# Ansible Icinga
+
+This role is used to configure an Icinga Instance over its Icinga Director.
+
+## Installation
+
+* create a `requirements.yml`:
+
+```bash
+---
+collections:
+ - name: t_systems_mms.icinga_director
+ src: https://github.com/T-Systems-MMS/ansible-collection-icinga-director
+ version: 1.2.2
+```
+
+* install the collections:
+
+```bash
+ansible-galaxy collection install -r requirements.yml -p collections/
+```
+
+## Dependencies
+
+collections:
+t_systems_mms.icinga_director >= 1.2.2
+
+## Role Variables
+
+| Variable | Required | Default |
+| -------------------------------- | -------- | --------------------------- |
+| **icinga** |
+| url | yes |
+| use_proxy | no |
+| validate_certs | no |
+| url_username | yes |
+| url_password | yes |
+| force_basic_auth | no |
+| client_cert | no |
+| client_key | no |
+| **icinga_timeperiod** |
+| icinga_timeperiods | no | [] |
+| display_name | no |
+| imports | no |
+| ranges | no |
+| **icinga_user_template** |
+| icinga_user_templates | no | [] |
+| imports | no |
+| period | no |
+| enable_notifications | no |
+| **icinga_user** |
+| icinga_users | no | [] |
+| display_name | no |
+| imports | yes | [] |
+| pager | no |
+| period | no |
+| disabled | no |
+| email | yes | null |
+| **icinga_zone** |
+| icinga_zones | no | [] |
+| is_global | no |
+| parent | no |
+| **icinga_endpoint** |
+| icinga_endpoints | no | [] |
+| host | no |
+| port | no |
+| log_duration | no |
+| zone | no |
+| **icinga_hostgroup** |
+| icinga_hostgroups | no | [] |
+| display_name | no |
+| assign_filter | no | `host.name="hostgroup.1-*"` |
+| **icinga_host_template** |
+| icinga_host_templates | no | [] |
+| display_name | no |
+| address | no |
+| address6 | no |
+| groups | no |
+| check_command | no |
+| check_interval | no |
+| disabled | no |
+| imports | no |
+| zone | no |
+| vars | no |
+| notes | no |
+| notes_url | no |
+| **icinga_host** |
+| icinga_hosts | no | [] |
+| display_name | no |
+| address | no |
+| address6 | no |
+| groups | no |
+| disabled | no |
+| imports | yes | [] |
+| zone | no |
+| vars | no |
+| notes | no |
+| notes_url | no |
+| **icinga_command_template** |
+| icinga_command_templates | no | [] |
+| display_name | no |
+| command | no |
+| methods_execute | yes | PluginCheck |
+| timeout | no |
+| imports | no |
+| disabled | no |
+| zone | no |
+| vars | no |
+| arguments | no |
+| **icinga_command** |
+| icinga_commands | no | [] |
+| command_type | yes | PluginCheck |
+| disabled | yes | false |
+| imports | no |
+| zone | no |
+| vars | no |
+| **icinga_service** |
+| icinga_services | no | [] |
+| display_name | no |
+| disabled | no |
+| check_command | no |
+| check_interval | no |
+| check_period | no |
+| check_timeout | no |
+| enable_active_checks | no |
+| enable_event_handler | no |
+| enable_notifications | no |
+| enable_passive_checks | no |
+| enable_perfdata | no |
+| groups | no |
+| host | yes |
+| imports | no |
+| max_check_attempts | no |
+| notes | no |
+| notes_url | no |
+| retry_interval | no |
+| use_agent | no |
+| vars | no |
+| volatile | no |
+| **icinga_service_template** |
+| icinga_service_templates | no | [] |
+| display_name | no |
+| disabled | no |
+| check_command | no |
+| check_interval | no |
+| check_period | no |
+| check_timeout | no |
+| enable_active_checks | no |
+| enable_event_handler | no |
+| enable_notifications | no |
+| enable_passive_checks | no |
+| enable_perfdata | no |
+| groups | no |
+| imports | no |
+| max_check_attempts | no |
+| notes | no |
+| notes_url | no |
+| retry_interval | no |
+| use_agent | no |
+| vars | no |
+| volatile | no |
+| **icinga_service_apply** |
+| icinga_service_applys | no | [] |
+| display_name | no |
+| groups | no |
+| apply_for | no |
+| assign_filter | no |
+| imports | no |
+| vars | no |
+| notes | no |
+| notes_url | no |
+| **icinga_servicegroup** |
+| icinga_servicegroups | no | [] |
+| display_name | no |
+| assign_filter | no |
+| **icinga_notification_template** |
+| icinga_notification_templates | no | [] |
+| notification_template_object | no |
+| state | no |
+| notification_interval | no |
+| states | no |
+| types | no |
+| times_begin | no |
+| times_end | no |
+| timeperiod | no |
+| users | no |
+| user_groups | no |
+| notification_command | no |
+| imports | no |
+| **icinga_notification** |
+| icinga_notifications | no | [] |
+| notification_interval | no |
+| types | no |
+| users | no |
+| apply_to | no |
+| assign_filter | no |
+| imports | no |
+| period | no |
+| **icinga_scheduled_downtime** |
+| icinga_scheduled_downtimes | no | [] |
+| state | yes | present
+| disabled | no | false
+| assign_filter | no |
+| apply_to | yes |
+| author | yes |
+| comment | yes |
+| duration | no |
+| fixed | yes |
+| ranges | no |
+| with_services | no | true
+
+## Example Playbook
+
+```bash
+---
+- hosts: localhost
+ gather_facts: false
+ collections:
+ - t_systems_mms.icinga_director
+ roles:
+ - ansible_icinga
+ vars:
+ icinga_url: "https://example.com"
+ icinga_user: "{{ icinga_user }}"
+ icinga_pass: "{{ icinga_pass }}"
+ icinga_timeperiods:
+ - timeperiod_object:
+ - "8x5"
+ ranges:
+ monday: "09:00-17:00"
+ tuesday: "09:00-17:00"
+ wednesday: "09:00-17:00"
+ thursday: "09:00-17:00"
+ friday: "09:00-17:00"
+ - timeperiod_object:
+ - "24x7"
+ ranges:
+ monday: "00:00-24:00"
+ tuesday: "00:00-24:00"
+ wednesday: "00:00-24:00"
+ thursday: "00:00-24:00"
+ friday: "00:00-24:00"
+ saturday: "00:00-24:00"
+ sunday: "00:00-24:00"
+ icinga_users:
+ - user_object:
+ - "service_abbreviation_email_24x7"
+ pager: "SIP/xxx"
+ email: "service_abbreviation@example.com"
+ - user_object:
+ - "service_abbreviation_8x5"
+ email: "service_abbreviation@example.com"
+ icinga_hostgroups:
+ - hostgroup_object:
+ - "service_abbreviation-environement"
+ - "service_abbreviation-environement-web"
+ icinga_hosts:
+ - host_object:
+ - "service_abbreviation-environement-web01"
+ icinga_scheduled_downtimes:
+ - scheduled_downtime_object:
+ - "service_abbreviation-environement-downtime01"
+```
diff --git a/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/defaults/main.yml b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/defaults/main.yml
new file mode 100644
index 000000000..9a9a68253
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/defaults/main.yml
@@ -0,0 +1,58 @@
+---
+# icinga_timeperiod
+icinga_timeperiods: []
+
+# icinga_user_template
+icinga_user_templates: []
+
+# icinga_user
+icinga_users: []
+icinga_user_imports: []
+icinga_user_disabled: false
+icinga_user_email: null
+
+# icinga_endpoints
+icinga_endpoints: []
+
+# icinga_zone
+icinga_zones: []
+
+# icinga_hostgroup
+icinga_hostgroups: []
+
+# icinga_host_template
+icinga_host_templates: []
+
+# icinga_host
+icinga_hosts: []
+icinga_host_imports: []
+
+# icinga_command_template
+icinga_command_templates: []
+icinga_command_template_command_type: PluginCheck
+
+# icinga_command
+icinga_commands: []
+icinga_command_type: PluginCheck
+icinga_command_disabled: false
+
+# icinga_service
+icinga_services: []
+
+# icinga_serviceset
+icinga_servicesets: []
+
+# icinga_service_template
+icinga_service_templates: []
+
+# icinga_service_apply
+icinga_service_applies: []
+
+# servicegroup
+icinga_servicegroups: []
+
+# icinga_notification
+icinga_notifications: []
+
+# icinga deploy
+icinga_deploy_config: false
diff --git a/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/handlers/main.yml b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/handlers/main.yml
new file mode 100644
index 000000000..61c61d47f
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/handlers/main.yml
@@ -0,0 +1,8 @@
+---
+- name: Deploy the icinga config
+ t_systems_mms.icinga_director.icinga_deploy:
+ url: "{{ icinga_url }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ when: icinga_deploy_config and icinga_deploy_config is defined
+ listen: config_deploy \ No newline at end of file
diff --git a/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/meta/main.yml b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/meta/main.yml
new file mode 100644
index 000000000..758b41e77
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/meta/main.yml
@@ -0,0 +1,10 @@
+---
+collections:
+ - t_systems_mms.icinga_director
+galaxy_info:
+ author: t_systems_mms
+ description: icinga configuration
+ license: GPLv3
+ min_ansible_version: 2.9
+ galaxy_tags:
+ - icinga
diff --git a/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_command.yml b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_command.yml
new file mode 100644
index 000000000..23eea8e0c
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_command.yml
@@ -0,0 +1,32 @@
+---
+# command.1 = command array
+# command.0 = icinga_command attribute
+- name: icinga_command
+ icinga_command:
+ url: "{{ icinga_url }}"
+ use_proxy: "{{ icinga_use_proxy | default(omit) }}"
+ validate_certs: "{{ icinga_validate_certs | default(omit) }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ force_basic_auth: "{{ icinga_force_basic_auth | default(omit) }}"
+ client_cert: "{{ icinga_client_cert | default(omit) }}"
+ client_key: "{{ icinga_client_key | default(omit) }}"
+ state: "{{ command.0.state | default(omit) }}"
+ command: "{{ command.0.command | default(omit) }}"
+ command_type: "{{ command.0.command_type | default(icinga_command_type) }}"
+ disabled: "{{ command.0.disabled | default(icinga_command_disabled) }}"
+ object_name: "{{ command.1 }}"
+ imports: "{{ command.0.imports | default(omit) }}"
+ timeout: "{{ command.0.timeout | default(omit) }}"
+ zone: "{{ command.0.zone | default(omit) }}"
+ vars: "{{ command.0.vars | default(omit) }}"
+ arguments: "{{ command.0.arguments | default(omit) }}"
+ retries: 3
+ delay: 3
+ register: result
+ until: result is succeeded
+ loop: "{{ icinga_commands|subelements('command_object') }}"
+ loop_control:
+ loop_var: command
+ tags: command
+ notify: config_deploy
diff --git a/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_command_template.yml b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_command_template.yml
new file mode 100644
index 000000000..85b2a0fae
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_command_template.yml
@@ -0,0 +1,33 @@
+---
+# command_template.1 = command_template array
+# command_template.0 = icinga_command_template attribute
+- name: icinga_command_template
+ icinga_command_template:
+ url: "{{ icinga_url }}"
+ use_proxy: "{{ icinga_use_proxy | default(omit) }}"
+ validate_certs: "{{ icinga_validate_certs | default(omit) }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ force_basic_auth: "{{ icinga_force_basic_auth | default(omit) }}"
+ client_cert: "{{ icinga_client_cert | default(omit) }}"
+ client_key: "{{ icinga_client_key | default(omit) }}"
+ state: "{{ command_template.0.state | default(omit) }}"
+ object_name: "{{ command_template.1 }}"
+ display_name: "{{ command_template.0.display_name | default(omit) }}"
+ command: "{{ command_template.0.command | default(omit) }}"
+ command_type: "{{ command_template.0.command_type | default(icinga_command_template_command_type) }}"
+ timeout: "{{ command_template.0.timeout | default(omit) }}"
+ imports: "{{ command_template.0.imports | default(omit) }}"
+ disabled: "{{ command_template.0.disabled | default(omit) }}"
+ zone: "{{ command_template.0.zone | default(omit) }}"
+ vars: "{{ command_template.0.vars | default(omit) }}"
+ arguments: "{{ command_template.0.arguments | default(omit) }}"
+ retries: 3
+ delay: 3
+ register: result
+ until: result is succeeded
+ loop: "{{ icinga_command_templates|subelements('command_template_object') }}"
+ loop_control:
+ loop_var: command_template
+ tags: command_template
+ notify: config_deploy
diff --git a/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_endpoint.yml b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_endpoint.yml
new file mode 100644
index 000000000..7373398a0
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_endpoint.yml
@@ -0,0 +1,28 @@
+---
+# endpoint.1 = endpoint array
+# endpoint.0 = icinga_endpoint attribute
+- name: icinga_endpoint
+ icinga_endpoint:
+ url: "{{ icinga_url }}"
+ use_proxy: "{{ icinga_use_proxy | default(omit) }}"
+ validate_certs: "{{ icinga_validate_certs | default(omit) }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ force_basic_auth: "{{ icinga_force_basic_auth | default(omit) }}"
+ client_cert: "{{ icinga_client_cert | default(omit) }}"
+ client_key: "{{ icinga_client_key | default(omit) }}"
+ state: "{{ endpoint.0.state | default(omit) }}"
+ object_name: "{{ endpoint.1 }}"
+ host: "{{ endpoint.0.host | default(omit) }}"
+ port: "{{ endpoint.0.port | default(omit) }}"
+ log_duration: "{{ endpoint.0.log_duration | default(omit) }}"
+ zone: "{{ endpoint.0.zone | default(omit) }}"
+ retries: 3
+ delay: 3
+ register: result
+ until: result is succeeded
+ loop: "{{ icinga_endpoints|subelements('endpoint_object') }}"
+ loop_control:
+ loop_var: endpoint
+ tags: endpoint
+ notify: config_deploy
diff --git a/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_host.yml b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_host.yml
new file mode 100644
index 000000000..8e4fb6cf8
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_host.yml
@@ -0,0 +1,56 @@
+---
+# host.1 = host array
+# host.0 = icinga_host attribute
+- name: icinga_host
+ icinga_host:
+ client_cert: "{{ icinga_client_cert | default(omit) }}"
+ client_key: "{{ icinga_client_key | default(omit) }}"
+ force_basic_auth: "{{ icinga_force_basic_auth | default(omit) }}"
+ state: "{{ host.0.state | default(omit) }}"
+ url_password: "{{ icinga_pass }}"
+ url_username: "{{ icinga_user }}"
+ url: "{{ icinga_url }}"
+ use_proxy: "{{ icinga_use_proxy | default(omit) }}"
+ validate_certs: "{{ icinga_validate_certs | default(omit) }}"
+ accept_config: "{{ host.0.accept_config | default(omit) }}"
+ address: "{{ host.0.address | default(omit) }}"
+ address6: "{{ host.0.address6 | default(omit) }}"
+ check_command: "{{ host.0.check_command | default(omit) }}"
+ check_interval: "{{ host.0.check_interval | default(omit) }}"
+ check_period: "{{ host.0.check_period | default(omit) }}"
+ check_timeout: "{{ host.0.check_timeout | default(omit) }}"
+ command_endpoint: "{{ command_endpoint | default(omit) }}"
+ disabled: "{{ host.0.disabled | default(omit) }}"
+ display_name: "{{ host.0.display_name | default(omit) }}"
+ enable_active_checks: "{{ host.0.enable_active_checks | default(omit) }}"
+ enable_event_handler: "{{ host.0.enable_event_handler | default(omit) }}"
+ enable_flapping: "{{ host.0.enable_flapping | default(omit) }}"
+ enable_notifications: "{{ host.0.enable_notifications | default(omit) }}"
+ enable_passive_checks: "{{ host.0.enable_passive_checks | default(omit) }}"
+ enable_perfdata: "{{ host.0.enable_perfdata | default(omit) }}"
+ event_command: "{{ host.0.event_command | default(omit) }}"
+ flapping_threshold_high: "{{ host.0.flapping_threshold_high | default(omit) }}"
+ flapping_threshold_low: "{{ host.0.flapping_threshold_low | default(omit) }}"
+ groups: "{{ host.0.groups | default(omit) }}"
+ has_agent: "{{ host.0.has_agent | default(omit) }}"
+ icon_image_alt: "{{ host.0.icon_image_alt | default(omit) }}"
+ icon_image: "{{ host.0.icon_image | default(omit) }}"
+ imports: "{{ host.0.imports | default(icinga_host_imports) }}"
+ master_should_connect: "{{ host.0.master_should_connect | default(omit) }}"
+ max_check_attempts: "{{ host.0.max_check_attempts | default(omit) }}"
+ notes_url: "{{ host.0.notes_url | default(omit) }}"
+ notes: "{{ host.0.notes | default(omit) }}"
+ object_name: "{{ host.1 }}"
+ retry_interval: "{{ host.0.retry_interval | default(omit) }}"
+ vars: "{{ host.0.vars | default(omit) }}"
+ volatile: "{{ host.0.volatile | default(omit) }}"
+ zone: "{{ host.0.zone | default(omit) }}"
+ retries: 3
+ delay: 3
+ register: result
+ until: result is succeeded
+ loop: "{{ icinga_hosts|subelements('host_object') }}"
+ loop_control:
+ loop_var: host
+ tags: host
+ notify: config_deploy
diff --git a/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_host_template.yml b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_host_template.yml
new file mode 100644
index 000000000..bad32814d
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_host_template.yml
@@ -0,0 +1,55 @@
+---
+# host_template.1 = host_template array
+# host_template.0 = icinga_host_template attribute
+- name: icinga_host_template
+ icinga_host_template:
+ client_cert: "{{ icinga_client_cert | default(omit) }}"
+ client_key: "{{ icinga_client_key | default(omit) }}"
+ force_basic_auth: "{{ icinga_force_basic_auth | default(omit) }}"
+ state: "{{ host.0.state | default(omit) }}"
+ url_password: "{{ icinga_pass }}"
+ url_username: "{{ icinga_user }}"
+ url: "{{ icinga_url }}"
+ use_proxy: "{{ icinga_use_proxy | default(omit) }}"
+ validate_certs: "{{ icinga_validate_certs | default(omit) }}"
+ accept_config: "{{ host_template.0.accept_config | default(omit) }}"
+ address: "{{ host_template.0.address | default(omit) }}"
+ address6: "{{ host_template.0.address6 | default(omit) }}"
+ check_command: "{{ host_template.0.check_command | default(omit) }}"
+ check_interval: "{{ host_template.0.check_interval | default(omit) }}"
+ check_period: "{{ host_template.0.check_period | default(omit) }}"
+ check_timeout: "{{ host_template.0.check_timeout | default(omit) }}"
+ disabled: "{{ host_template.0.disabled | default(omit) }}"
+ display_name: "{{ host_template.0.display_name | default(omit) }}"
+ enable_active_checks: "{{ host_template.0.enable_active_checks | default(omit) }}"
+ enable_event_handler: "{{ host_template.0.enable_event_handler | default(omit) }}"
+ enable_flapping: "{{ host_template.0.enable_flapping | default(omit) }}"
+ enable_notifications: "{{ host_template.0.enable_notifications | default(omit) }}"
+ enable_passive_checks: "{{ host_template.0.enable_passive_checks | default(omit) }}"
+ enable_perfdata: "{{ host_template.0.enable_perfdata | default(omit) }}"
+ event_command: "{{ host_template.0.event_command | default(omit) }}"
+ flapping_threshold_high: "{{ host_template.0.flapping_threshold_high | default(omit) }}"
+ flapping_threshold_low: "{{ host_template.0.flapping_threshold_low | default(omit) }}"
+ groups: "{{ host_template.0.address | default(omit) }}"
+ has_agent: "{{ host_template.0.has_agent | default(omit) }}"
+ icon_image_alt: "{{ host_template.0.icon_image_alt | default(omit) }}"
+ icon_image: "{{ host_template.0.icon_image | default(omit) }}"
+ imports: "{{ host_template.0.imports | default(omit) }}"
+ master_should_connect: "{{ host_template.0.master_should_connect | default(omit) }}"
+ max_check_attempts: "{{ host_template.0.max_check_attempts | default(omit) }}"
+ notes_url: "{{ host_template.0.notes_url | default(omit) }}"
+ notes: "{{ host_template.0.notes | default(omit) }}"
+ object_name: "{{ host_template.1 }}"
+ retry_interval: "{{ host_template.0.retry_interval | default(omit) }}"
+ vars: "{{ host_template.0.vars | default(omit) }}"
+ volatile: "{{ host_template.0.volatile | default(omit) }}"
+ zone: "{{ host_template.0.zone | default(omit) }}"
+ retries: 3
+ delay: 3
+ register: result
+ until: result is succeeded
+ loop: "{{ icinga_host_templates|subelements('host_template_object') }}"
+ loop_control:
+ loop_var: host_template
+ tags: host_template
+ notify: config_deploy
diff --git a/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_hostgroup.yml b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_hostgroup.yml
new file mode 100644
index 000000000..45f825ece
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_hostgroup.yml
@@ -0,0 +1,26 @@
+---
+# hostgroup.1 = hostgroup array
+# hostgroup.0 = icinga_hostgroup attribute
+- name: icinga_hostgroup
+ icinga_hostgroup:
+ url: "{{ icinga_url }}"
+ use_proxy: "{{ icinga_use_proxy | default(omit) }}"
+ validate_certs: "{{ icinga_validate_certs | default(omit) }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ force_basic_auth: "{{ icinga_force_basic_auth | default(omit) }}"
+ client_cert: "{{ icinga_client_cert | default(omit) }}"
+ client_key: "{{ icinga_client_key | default(omit) }}"
+ state: "{{ hostgroup.0.state | default(omit) }}"
+ object_name: "{{ hostgroup.1 }}"
+ display_name: "{{ hostgroup.0.display_name | default(omit) }}"
+ assign_filter: "{{ hostgroup.0.assign_filter | default('host.name=\"' + hostgroup.1 + '-*\"') }}"
+ retries: 3
+ delay: 3
+ register: result
+ until: result is succeeded
+ loop: "{{ icinga_hostgroups|subelements('hostgroup_object') }}"
+ loop_control:
+ loop_var: hostgroup
+ tags: hostgroup
+ notify: config_deploy
diff --git a/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_notification.yml b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_notification.yml
new file mode 100644
index 000000000..84f139907
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_notification.yml
@@ -0,0 +1,34 @@
+---
+# notification.1 = notification array
+# notification.0 = icinga_notification attribute
+- name: icinga_notification
+ icinga_notification:
+ url: "{{ icinga_url }}"
+ use_proxy: "{{ icinga_use_proxy | default(omit) }}"
+ validate_certs: "{{ icinga_validate_certs | default(omit) }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ force_basic_auth: "{{ icinga_force_basic_auth | default(omit) }}"
+ client_cert: "{{ icinga_client_cert | default(omit) }}"
+ client_key: "{{ icinga_client_key | default(omit) }}"
+ state: "{{ notification.0.state | default(omit) }}"
+ object_name: "{{ notification.1 }}"
+ notification_interval: "{{ notification.0.notification_interval | default(omit) }}"
+ states: "{{ notification.0.states | default(omit) }}"
+ types: "{{ notification.0.types | default(omit) }}"
+ users: "{{ notification.0.users | default(omit) }}"
+ user_groups: "{{ notification.0.user_groups | default(omit) }}"
+ apply_to: "{{ notification.0.apply_to | default(omit) }}"
+ assign_filter: "{{ notification.0.assign_filter | default(omit) }}"
+ imports: "{{ notification.0.imports | default(omit) }}"
+ period: "{{ notification.0.period | default(omit) }}"
+ vars: "{{ notification.0.vars | default(omit) }}"
+ retries: 3
+ delay: 3
+ register: result
+ until: result is succeeded
+ loop: "{{ icinga_notifications|subelements('notification_object') }}"
+ loop_control:
+ loop_var: notification
+ tags: notification
+ notify: config_deploy
diff --git a/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_notification_template.yml b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_notification_template.yml
new file mode 100644
index 000000000..7afa26c0a
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_notification_template.yml
@@ -0,0 +1,35 @@
+---
+# notification_template.1 = notification_template array
+# notification_template.0 = icinga_notification_template attribute
+- name: icinga_notification_template
+ icinga_notification_template:
+ url: "{{ icinga_url }}"
+ use_proxy: "{{ icinga_use_proxy | default(omit) }}"
+ validate_certs: "{{ icinga_validate_certs | default(omit) }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ force_basic_auth: "{{ icinga_force_basic_auth | default(omit) }}"
+ client_cert: "{{ icinga_client_cert | default(omit) }}"
+ client_key: "{{ icinga_client_key | default(omit) }}"
+ object_name: "{{ notification_template.1 }}"
+ state: "{{ notification_template.0.state | default(omit) }}"
+ notification_interval: "{{ notification_template.0.notification_interval | default(omit) }}"
+ states: "{{ notification_template.0.states | default(omit) }}"
+ types: "{{ notification_template.0.types | default(omit) }}"
+ times_begin: "{{ notification_template.0.times_begin | default(omit) }}"
+ times_end: "{{ notification_template.0.times_end | default(omit) }}"
+ time_period: "{{ notification_template.0.time_period | default(omit) }}"
+ users: "{{ notification_template.0.users | default(omit) }}"
+ user_groups: "{{ notification_template.0.user_groups | default(omit) }}"
+ notification_command: "{{ notification_template.0.notification_command | default(omit) }}"
+ imports: "{{ notification_template.0.imports | default(omit) }}"
+ zone: "{{ notification_template.0.zone | default(omit) }}"
+ retries: 3
+ delay: 3
+ register: result
+ until: result is succeeded
+ loop: "{{ icinga_notification_templates|subelements('notification_template_object') }}"
+ loop_control:
+ loop_var: notification_template
+ tags: notification_template
+ notify: config_deploy
diff --git a/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_scheduled_downtime.yml b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_scheduled_downtime.yml
new file mode 100644
index 000000000..a2089b9ea
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_scheduled_downtime.yml
@@ -0,0 +1,30 @@
+---
+- name: icinga_scheduled_downtime
+ t_systems_mms.icinga_director.icinga_scheduled_downtime:
+ url: "{{ icinga_url }}"
+ use_proxy: "{{ icinga_use_proxy | default(omit) }}"
+ validate_certs: "{{ icinga_validate_certs | default(omit) }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ force_basic_auth: "{{ icinga_force_basic_auth | default(omit) }}"
+ client_cert: "{{ icinga_client_cert | default(omit) }}"
+ client_key: "{{ icinga_client_key | default(omit) }}"
+ state: "{{ downtime.0.state | default(omit) }}"
+ object_name: "{{ downtime.1 }}"
+ author: "{{ downtime.0.author }}"
+ comment: "{{ downtime.0.comment }}"
+ fixed: "{{ downtime.0.fixed }}"
+ with_services: "{{ downtime.0.with_services | default(omit) }}"
+ apply_to: "{{ downtime.0.apply_to }}"
+ assign_filter: "{{ downtime.0.assign_filter | default(omit) }}"
+ duration: "{{ downtime.0.duration | default(omit) }}"
+ ranges: "{{ downtime.0.ranges| default(omit) }}"
+ retries: 3
+ delay: 3
+ register: result
+ until: result is succeeded
+ loop: "{{ icinga_scheduled_downtimes|subelements('scheduled_downtime_object') }}"
+ loop_control:
+ loop_var: downtime
+ tags: downtime
+ notify: config_deploy
diff --git a/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_service.yml b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_service.yml
new file mode 100644
index 000000000..922bc00ce
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_service.yml
@@ -0,0 +1,45 @@
+---
+# service.1 = service array
+# service.0 = icinga_service attribute
+- name: icinga_service
+ icinga_service:
+ url: "{{ icinga_url }}"
+ use_proxy: "{{ icinga_use_proxy | default(omit) }}"
+ validate_certs: "{{ icinga_validate_certs | default(omit) }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ force_basic_auth: "{{ icinga_force_basic_auth | default(omit) }}"
+ client_cert: "{{ icinga_client_cert | default(omit) }}"
+ client_key: "{{ icinga_client_key | default(omit) }}"
+ state: "{{ service.0.state | default(omit) }}"
+ object_name: "{{ service.1 }}"
+ display_name: "{{ service.0.display_name | default(omit) }}"
+ disabled: "{{ service.0.disabled | default(omit) }}"
+ check_command: "{{ service.0.check_command | default(omit) }}"
+ check_interval: "{{ service.0.check_interval | default(omit) }}"
+ check_period: "{{ service.0.check_period | default(omit) }}"
+ check_timeout: "{{ service.0.check_timeout | default(omit) }}"
+ enable_active_checks: "{{ service.0.enable_active_checks | default(omit) }}"
+ enable_event_handler: "{{ service.0.enable_event_handler | default(omit) }}"
+ enable_notifications: "{{ service.0.enable_notifications | default(omit) }}"
+ enable_passive_checks: "{{ service.0.enable_passive_checks | default(omit) }}"
+ enable_perfdata: "{{ service.0.enable_perfdata | default(omit) }}"
+ groups: "{{ service.0.groups | default(omit) }}"
+ host: "{{ service.0.host | default(omit) }}"
+ imports: "{{ service.0.imports | default(omit) }}"
+ max_check_attempts: "{{ service.0.max_check_attempts | default(omit) }}"
+ notes: "{{ service.0.notes | default(omit) }}"
+ notes_url: "{{ service.0.notes_url | default(omit) }}"
+ retry_interval: "{{ service.0.retry_interval | default(omit) }}"
+ use_agent: "{{ service.0.use_agent | default(omit) }}"
+ vars: "{{ service.0.vars | default(omit) }}"
+ volatile: "{{ service.0.volatile | default(omit) }}"
+ retries: 3
+ delay: 3
+ register: result
+ until: result is succeeded
+ loop: "{{ icinga_services|subelements('service_object') }}"
+ loop_control:
+ loop_var: service
+ tags: service
+ notify: config_deploy
diff --git a/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_service_apply.yml b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_service_apply.yml
new file mode 100644
index 000000000..3437efc45
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_service_apply.yml
@@ -0,0 +1,45 @@
+---
+# service_apply.1 = service_apply array
+# service_apply.0 = icinga_service_apply attribute
+- name: icinga_service_apply
+ icinga_service_apply:
+ url: "{{ icinga_url }}"
+ use_proxy: "{{ icinga_use_proxy | default(omit) }}"
+ validate_certs: "{{ icinga_validate_certs | default(omit) }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ force_basic_auth: "{{ icinga_force_basic_auth | default(omit) }}"
+ client_cert: "{{ icinga_client_cert | default(omit) }}"
+ client_key: "{{ icinga_client_key | default(omit) }}"
+ state: "{{ service_apply.0.state | default(omit) }}"
+ object_name: "{{ service_apply.1 }}"
+ display_name: "{{ service_apply.0.display_name | default(service_apply.1) }}"
+ groups: "{{ service_apply.0.groups | default(omit) }}"
+ apply_for: "{{ service_apply.0.apply_for | default(omit) }}"
+ assign_filter: "{{ service_apply.0.assign_filter | default(omit) }}"
+ imports: "{{ service_apply.0.imports | default(omit) }}"
+ command_endpoint: "{{ service_apply.0.command_endpoint | default(omit) }}"
+ vars: "{{ service_apply.0.vars | default(omit) }}"
+ notes: "{{ service_apply.0.notes | default(omit) }}"
+ notes_url: "{{ service_apply.0.notes_url | default(omit) }}"
+ check_interval: "{{ service_apply.0.check_interval | default(omit) }}"
+ check_period: "{{ service_apply.0.check_period | default(omit) }}"
+ check_timeout: "{{ service_apply.0.check_timeout | default(omit) }}"
+ check_command: "{{ service_apply.0.check_command | default(omit) }}"
+ enable_active_checks: "{{ service_apply.0.enable_active_checks | default(omit) }}"
+ enable_event_handler: "{{ service_apply.0.enable_event_handler | default(omit) }}"
+ enable_notifications: "{{ service_apply.0.enable_notifications | default(omit) }}"
+ enable_passive_checks: "{{ service_apply.0.enable_passive_checks | default(omit) }}"
+ enable_perfdata: "{{ service_apply.0.enable_perfdata | default(omit) }}"
+ event_command: "{{ service_apply.0.event_command | default(omit) }}"
+ max_check_attempts: "{{ service_apply.0.max_check_attempts | default(omit) }}"
+ retry_interval: "{{ service_apply.0.retry_interval | default(omit) }}"
+ retries: 3
+ delay: 3
+ register: result
+ until: result is succeeded
+ loop: "{{ icinga_service_applies|subelements('service_apply_object') }}"
+ loop_control:
+ loop_var: service_apply
+ tags: service_apply
+ notify: config_deploy
diff --git a/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_service_template.yml b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_service_template.yml
new file mode 100644
index 000000000..15531b749
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_service_template.yml
@@ -0,0 +1,45 @@
+---
+# service_template.1 = service_template array
+# service_template.0 = icinga_service_template attribute
+- name: icinga_service_template
+ icinga_service_template:
+ url: "{{ icinga_url }}"
+ use_proxy: "{{ icinga_use_proxy | default(omit) }}"
+ validate_certs: "{{ icinga_validate_certs | default(omit) }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ force_basic_auth: "{{ icinga_force_basic_auth | default(omit) }}"
+ client_cert: "{{ icinga_client_cert | default(omit) }}"
+ client_key: "{{ icinga_client_key | default(omit) }}"
+ state: "{{ service_template.0.state | default(omit) }}"
+ object_name: "{{ service_template.1 }}"
+ display_name: "{{ service_template.0.display_name | default(omit) }}"
+ disabled: "{{ service_template.0.disabled | default(omit) }}"
+ check_command: "{{ service_template.0.check_command | default(omit) }}"
+ check_interval: "{{ service_template.0.check_interval | default(omit) }}"
+ check_period: "{{ service_template.0.check_period | default(omit) }}"
+ check_timeout: "{{ service_template.0.check_timeout | default(omit) }}"
+ enable_active_checks: "{{ service_template.0.enable_active_checks | default(omit) }}"
+ enable_event_handler: "{{ service_template.0.enable_event_handler | default(omit) }}"
+ enable_notifications: "{{ service_template.0.enable_notifications | default(omit) }}"
+ enable_passive_checks: "{{ service_template.0.enable_passive_checks | default(omit) }}"
+ enable_perfdata: "{{ service_template.0.enable_perfdata | default(omit) }}"
+ groups: "{{ service_template.0.groups | default(omit) }}"
+ imports: "{{ service_template.0.imports | default(omit) }}"
+ max_check_attempts: "{{ service_template.0.max_check_attempts | default(omit) }}"
+ notes: "{{ service_template.0.notes | default(omit) }}"
+ notes_url: "{{ service_template.0.notes_url | default(omit) }}"
+ retry_interval: "{{ service_template.0.retry_interval | default(omit) }}"
+ use_agent: "{{ service_template.0.use_agent | default(omit) }}"
+ vars: "{{ service_template.0.vars | default(omit) }}"
+ volatile: "{{ service_template.0.volatile | default(omit) }}"
+ event_command: "{{ service_template.0.event_command | default(omit) }}"
+ retries: 3
+ delay: 3
+ register: result
+ until: result is succeeded
+ loop: "{{ icinga_service_templates|subelements('service_template_object') }}"
+ loop_control:
+ loop_var: service_template
+ tags: service_template
+ notify: config_deploy
diff --git a/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_servicegroup.yml b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_servicegroup.yml
new file mode 100644
index 000000000..9ba5e40dc
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_servicegroup.yml
@@ -0,0 +1,26 @@
+---
+# servicegroup.1 = servicegroup array
+# servicegroup.0 = icinga_servicegroup attribute
+- name: icinga_servicegroup
+ icinga_servicegroup:
+ url: "{{ icinga_url }}"
+ use_proxy: "{{ icinga_use_proxy | default(omit) }}"
+ validate_certs: "{{ icinga_validate_certs | default(omit) }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ force_basic_auth: "{{ icinga_force_basic_auth | default(omit) }}"
+ client_cert: "{{ icinga_client_cert | default(omit) }}"
+ client_key: "{{ icinga_client_key | default(omit) }}"
+ state: "{{ servicegroup.0.state | default(omit) }}"
+ object_name: "{{ servicegroup.1 }}"
+ display_name: "{{ servicegroup.0.display_name | default(omit) }}"
+ assign_filter: "{{ servicegroup.0.assign_filter | default(omit) }}"
+ retries: 3
+ delay: 3
+ register: result
+ until: result is succeeded
+ loop: "{{ icinga_servicegroups|subelements('servicegroup_object') }}"
+ loop_control:
+ loop_var: servicegroup
+ tags: servicegroup
+ notify: config_deploy
diff --git a/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_serviceset.yml b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_serviceset.yml
new file mode 100644
index 000000000..a609cca2d
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_serviceset.yml
@@ -0,0 +1,26 @@
+---
+# serviceset.1 = serviceset array
+# serviceset.0 = icinga_serviceset attribute
+- name: icinga_serviceset
+ icinga_serviceset:
+ url: "{{ icinga_url }}"
+ use_proxy: "{{ icinga_use_proxy | default(omit) }}"
+ validate_certs: "{{ icinga_validate_certs | default(omit) }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ force_basic_auth: "{{ icinga_force_basic_auth | default(omit) }}"
+ client_cert: "{{ icinga_client_cert | default(omit) }}"
+ client_key: "{{ icinga_client_key | default(omit) }}"
+ state: "{{ service.0.state | default(omit) }}"
+ assign_filter: "{{ serviceset.0.assign_filter | default(omit)}}"
+ description: "{{ serviceset.0.description | default(omit)}}"
+ object_name: "{{ serviceset.1 }}"
+ retries: 3
+ delay: 3
+ register: result
+ until: result is succeeded
+ loop: "{{ icinga_servicesets|subelements('serviceset_object') }}"
+ loop_control:
+ loop_var: serviceset
+ tags: serviceset
+ notify: config_deploy
diff --git a/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_timeperiod.yml b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_timeperiod.yml
new file mode 100644
index 000000000..bfc702963
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_timeperiod.yml
@@ -0,0 +1,27 @@
+---
+# timeperiod.1 = timeperiod array
+# timeperiod.0 = icinga_timeperiod attribute
+- name: icinga_timeperiod
+ icinga_timeperiod:
+ url: "{{ icinga_url }}"
+ use_proxy: "{{ icinga_use_proxy | default(omit) }}"
+ validate_certs: "{{ icinga_validate_certs | default(omit) }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ force_basic_auth: "{{ icinga_force_basic_auth | default(omit) }}"
+ client_cert: "{{ icinga_client_cert | default(omit) }}"
+ client_key: "{{ icinga_client_key | default(omit) }}"
+ state: "{{ timeperiod.0.state | default(omit) }}"
+ object_name: "{{ timeperiod.1 }}"
+ display_name: "{{ timeperiod.0.display_name | default(omit) }}"
+ imports: "{{ timeperiod.0.imports | default(omit) }}"
+ ranges: "{{ timeperiod.0.ranges | default(omit) }}"
+ retries: 3
+ delay: 3
+ register: result
+ until: result is succeeded
+ loop: "{{ icinga_timeperiods|subelements('timeperiod_object') }}"
+ loop_control:
+ loop_var: timeperiod
+ tags: timeperiod
+ notify: config_deploy
diff --git a/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_user.yml b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_user.yml
new file mode 100644
index 000000000..0d3552de9
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_user.yml
@@ -0,0 +1,30 @@
+---
+# user.1 = user array
+# user.0 = icinga_user attribute
+- name: icinga_user
+ icinga_user:
+ url: "{{ icinga_url }}"
+ use_proxy: "{{ icinga_use_proxy | default(omit) }}"
+ validate_certs: "{{ icinga_validate_certs | default(omit) }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ force_basic_auth: "{{ icinga_force_basic_auth | default(omit) }}"
+ client_cert: "{{ icinga_client_cert | default(omit) }}"
+ client_key: "{{ icinga_client_key | default(omit) }}"
+ state: "{{ user.0.state | default(omit) }}"
+ object_name: "{{ user.1 }}"
+ display_name: "{{ user.0.display_name | default(omit) }}"
+ imports: "{{ user.0.imports | default(icinga_user_imports) }}"
+ pager: "{{ user.0.pager | default(omit) }}"
+ period: "{{ user.0.period | default(omit) }}"
+ disabled: "{{ user.0.disabled | default(omit) }}"
+ email: "{{ user.0.email | default(icinga_user_email) }}"
+ retries: 3
+ delay: 3
+ register: result
+ until: result is succeeded
+ loop: "{{ icinga_users|subelements('user_object') }}"
+ loop_control:
+ loop_var: user
+ tags: user
+ notify: config_deploy
diff --git a/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_user_template.yml b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_user_template.yml
new file mode 100644
index 000000000..432472e6e
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_user_template.yml
@@ -0,0 +1,28 @@
+---
+# user_template.1 = user_template array
+# user_template.0 = icinga_user_template attribute
+- name: icinga_user_template
+ icinga_user_template:
+ url: "{{ icinga_url }}"
+ use_proxy: "{{ icinga_use_proxy | default(omit) }}"
+ validate_certs: "{{ icinga_validate_certs | default(omit) }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ force_basic_auth: "{{ icinga_force_basic_auth | default(omit) }}"
+ client_cert: "{{ icinga_client_cert | default(omit) }}"
+ client_key: "{{ icinga_client_key | default(omit) }}"
+ state: "{{ user_template.0.state | default(omit) }}"
+ object_name: "{{ user_template.1 }}"
+ imports: "{{ user_template.0.imports | default(omit) }}"
+ period: "{{ user_template.0.period | default(omit) }}"
+ enable_notifications: "{{ user_template.0.enable_notifications | default(omit) }}"
+ zone: "{{ user_template.0.zone | default(omit) }}"
+ retries: 3
+ delay: 3
+ register: result
+ until: result is succeeded
+ loop: "{{ icinga_user_templates|subelements('user_template_object') }}"
+ loop_control:
+ loop_var: user_template
+ tags: user_template
+ notify: config_deploy
diff --git a/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_zone.yml b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_zone.yml
new file mode 100644
index 000000000..c907f3f87
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/icinga_zone.yml
@@ -0,0 +1,26 @@
+---
+# zone.1 = zone array
+# zone.0 = icinga_zone attribute
+- name: icinga_zone
+ icinga_zone:
+ url: "{{ icinga_url }}"
+ use_proxy: "{{ icinga_use_proxy | default(omit) }}"
+ validate_certs: "{{ icinga_validate_certs | default(omit) }}"
+ url_username: "{{ icinga_user }}"
+ url_password: "{{ icinga_pass }}"
+ force_basic_auth: "{{ icinga_force_basic_auth | default(omit) }}"
+ client_cert: "{{ icinga_client_cert | default(omit) }}"
+ client_key: "{{ icinga_client_key | default(omit) }}"
+ state: "{{ zone.0.state | default(omit) }}"
+ object_name: "{{ zone.1 }}"
+ is_global: "{{ zone.0.is_global | default(omit) }}"
+ parent: "{{ zone.0.parent | default(omit) }}"
+ retries: 3
+ delay: 3
+ register: result
+ until: result is succeeded
+ loop: "{{ icinga_zones|subelements('zone_object') }}"
+ loop_control:
+ loop_var: zone
+ tags: zone
+ notify: config_deploy
diff --git a/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/main.yml b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/main.yml
new file mode 100644
index 000000000..24d16e370
--- /dev/null
+++ b/ansible_collections/t_systems_mms/icinga_director/roles/ansible_icinga/tasks/main.yml
@@ -0,0 +1,90 @@
+---
+- name: icinga timeperiod configuration
+ include_tasks: icinga_timeperiod.yml
+ when: icinga_timeperiods is defined
+ tags: timeperiod
+
+- name: icinga user_template configuration
+ include_tasks: icinga_user_template.yml
+ when: icinga_user_templates is defined
+ tags: user_template
+
+- name: icinga user configuration
+ include_tasks: icinga_user.yml
+ when: icinga_users is defined
+ tags: user
+
+- name: icinga zone configuration
+ include_tasks: icinga_zone.yml
+ when: icinga_zones is defined
+ tags: zone
+
+- name: icinga endpoint configuration
+ include_tasks: icinga_endpoint.yml
+ when: icinga_endpoints is defined
+ tags: endpoint
+
+- name: icinga hostgroup configuration
+ include_tasks: icinga_hostgroup.yml
+ when: icinga_hostgroups is defined
+ tags: hostgroup
+
+- name: icinga host_template configuration
+ include_tasks: icinga_host_template.yml
+ when: icinga_host_templates is defined
+ tags: host_template
+
+- name: icinga host configuration
+ include_tasks: icinga_host.yml
+ when: icinga_hosts is defined
+ tags: host
+
+- name: icinga command_template configuration
+ include_tasks: icinga_command_template.yml
+ when: icinga_command_templates is defined
+ tags: command_template
+
+- name: icinga command configuration
+ include_tasks: icinga_command.yml
+ when: icinga_commands is defined
+ tags: command
+
+- name: icinga service_template configuration
+ include_tasks: icinga_service_template.yml
+ when: icinga_service_templates is defined
+ tags: service_template
+
+- name: icinga service_apply configuration
+ include_tasks: icinga_service_apply.yml
+ when: icinga_service_applies is defined
+ tags: service_apply
+
+- name: icinga servicegroup configuration
+ include_tasks: icinga_servicegroup.yml
+ when: icinga_servicegroups is defined
+ tags: servicegroup
+
+- name: icinga service configuration
+ include_tasks: icinga_service.yml
+ when: icinga_services is defined
+ tags: service
+
+- name: icinga serviceset configuration
+ include_tasks: icinga_serviceset.yml
+ when: icinga_servicesets is defined
+ tags: serviceset
+
+- name: icinga notification template configuration
+ include_tasks: icinga_notification_template.yml
+ when: icinga_notification_templates is defined
+ tags: notification_template
+
+- name: icinga notification configuration
+ include_tasks: icinga_notification.yml
+ when: icinga_notifications is defined
+ tags: notification
+
+- name: icinga downtime configuration
+ include_tasks: icinga_scheduled_downtime.yml
+ when: icinga_scheduled_downtimes is defined
+ tags: downtime