Skip to content

Commit

Permalink
Feature/ansible inventory (#177)
Browse files Browse the repository at this point in the history
* Initial commit of working inventory plugin

* Allow for negation of in-filter ('group' in host.groups)

* Add documentation about the Ansible Inventory Plugin 'icinga.icinga.icinga'

* Add test cases for inventory plugin

* Add changelog fragment for 'feature/ansible-inventory'
  • Loading branch information
Donien authored Jan 12, 2024
1 parent be451c1 commit 1cd05d2
Show file tree
Hide file tree
Showing 7 changed files with 1,795 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,14 @@ jobs:
with:
python-version: ${{ matrix.python }}

- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install "ansible-core>=2.13.10" "requests>=1.0.0"
- name: Test with unittest
run: |
python -m unittest -v tests.unittestpy3.test_data
python -m unittest -v tests.unittestpy3.test_inventory
env:
MOLECULE_DISTRO: ${{ matrix.distro }}#
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Collection to setup and manage components of the Icinga software stack.
* [Role: icinga.icinga.icingaweb2](doc/role-icingaweb2/role-icingaweb2.md)
* [Role: icinga.icinga.monitoring_plugins](doc/role-monitoring_plugins/role-monitoring_plugins.md)
* [List of Available Check Commands](doc/role-monitoring_plugins/check_command_list.md)
* [Inventory Plugin: icinga.icinga.icinga](doc/plugins/inventory/icinga-inventory-plugin.md)


## Installation
Expand Down
3 changes: 3 additions & 0 deletions changelogs/fragments/feature_ansible_inventory.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
major_changes:
- Add an Ansible Inventory Plugin to fetch host information from Icinga 2's API for use as an Ansible Inventory
6 changes: 6 additions & 0 deletions doc/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ The collection includes six roles in the current version.
* icinga.monitoring_plugins: Role to install and manage Icinga2 compatible monitoring plugins.
* [Documentation: doc/role-monitoring_plugins](role-monitoring_plugins/role-monitoring_plugins.md)

---

The collection includes a plugin that allows you to use Icinga as an inventory source for Ansible.

* icinga.icinga.icinga: Ansible Inventory Plugin to fetch hosts from Icinga.
* [Documentation: doc/plugins/inventory/icinga-inventory-plugin.md](plugins/inventory/icinga-inventory-plugin.md)

---
**NOTE**
Expand Down
Loading

0 comments on commit 1cd05d2

Please sign in to comment.