mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-27 10:40:22 -07:00
Adds group_by_hostgroups parameter to Icinga2 inventory (#7998)
* (lots of commit messages) --------- Co-authored-by: Gianluca Salvo <gianluca.salvo@gruppomol.it> Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
fb67df3051
commit
4947786d36
3 changed files with 19 additions and 5 deletions
|
@ -86,6 +86,8 @@ def get_option(option):
|
|||
return {}
|
||||
elif option == 'strict':
|
||||
return False
|
||||
elif option == 'group_by_hostgroups':
|
||||
return True
|
||||
else:
|
||||
return None
|
||||
|
||||
|
@ -96,6 +98,7 @@ def test_populate(inventory, mocker):
|
|||
inventory.icinga2_password = 'password'
|
||||
inventory.icinga2_url = 'https://localhost:5665' + '/v1'
|
||||
inventory.inventory_attr = "address"
|
||||
inventory.group_by_hostgroups = True
|
||||
|
||||
# bypass authentication and API fetch calls
|
||||
inventory._check_api = mocker.MagicMock(side_effect=check_api)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue