{"id":19882447,"url":"https://github.com/derjd/ansible-icinga2downtime","last_synced_at":"2026-04-19T03:02:34.239Z","repository":{"id":78324691,"uuid":"239867584","full_name":"derJD/ansible-icinga2downtime","owner":"derJD","description":"Ansible role for adding/removing downtimes in icinga2 via API","archived":false,"fork":false,"pushed_at":"2020-02-11T21:31:10.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-05T09:37:43.431Z","etag":null,"topics":["ansible","ansible-role","downtimes","icinga2","role"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/derJD.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-11T21:24:40.000Z","updated_at":"2021-01-26T11:33:08.000Z","dependencies_parsed_at":"2023-07-29T23:15:47.718Z","dependency_job_id":null,"html_url":"https://github.com/derJD/ansible-icinga2downtime","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/derJD/ansible-icinga2downtime","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derJD%2Fansible-icinga2downtime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derJD%2Fansible-icinga2downtime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derJD%2Fansible-icinga2downtime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derJD%2Fansible-icinga2downtime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/derJD","download_url":"https://codeload.github.com/derJD/ansible-icinga2downtime/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derJD%2Fansible-icinga2downtime/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31992822,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ansible-role","downtimes","icinga2","role"],"created_at":"2024-11-12T17:17:27.920Z","updated_at":"2026-04-19T03:02:34.212Z","avatar_url":"https://github.com/derJD.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# icinga2downtime\n\nThis role add and removes downtimes in icinga2 via [API](https://icinga.com/docs/icinga2/latest/doc/12-icinga2-api/#schedule-downtime).\nThere is an [Github Issue](https://github.com/ansible/ansible/pull/24131) adding this feature as module, but last action happend back on 2018...\nCurrently it downtimes Host and all its Services associatid with it.\nRemoving downtime is done by matching comment and host object.\n\n## Requirements\nNone so far.\n\n## Variables\nThere are a bunch of defaults. Only using `dt_icinga`, `dt_user`, `dt_pass` should be sufficient most of the time.\n\n| variable | default | description |\n| --- | --- | --- |\n| i2d_icinga | None | Icinga2 host to connect to |\n| i2d_port | 5665 | Icinga2 port to connect to |\n| i2d_user | icinga2 | Username for authentification |\n| i2d_pass | icinga2 | Password for authentification |\n| i2d_host | \"{{ hostvars[inventory_hostname].ansible_host | default(inventory_hostname) }}\" | Hostname which should be downtimed. |\n| i2d_msg | 'downtimed with ansible-role icinga2downtime' | comment displayed in downtime |\n| i2d_author | \"{{ lookup('env','USER') }}\" | Author name displayed in downtime |\n| i2d_from | 'now' | Downtime ranges are set with unixtimestamps. this will be translated by `date` |\n| i2d_until | '+2 hours' | Downtime ranges are set with unixtimestamps. this will be translated by `date` |\n| i2d_add | no | When set to `yes` adds downtime |\n| i2d_remove | no | When set to `yes` removes downtime |\n\n## Dependencies\nNone so far.\n\n## Example\n\n```\n---\n- hosts: all\n  gather_facts: 'no'\n  vars:\n    i2d_icinga: icinga2.example.com\n    i2d_user: derJD\n    i2d_pass: VeryVerySecret!1\n  tasks:\n    - include_role:\n        name: derJD.icinga2downtime\n        apply:\n          delegate_to: localhost\n      vars: { i2d_add: \"yes\" }\n\n    - [do something fancy]\n\n    - include_role:\n        name: derJD.icinga2downtime\n        apply:\n          delegate_to: localhost\n      vars: { i2d_remove: \"yes\"\n```\n\n## License\nBSD\n\n## Author Information\n[derJD](https://gihub.com/derJD)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderjd%2Fansible-icinga2downtime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fderjd%2Fansible-icinga2downtime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderjd%2Fansible-icinga2downtime/lists"}