Skip to content

Commit

Permalink
Merge branch 'main' into mfa
Browse files Browse the repository at this point in the history
  • Loading branch information
pyrodie18 authored Aug 3, 2024
2 parents b53dd41 + 1978473 commit 9ebebc7
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/plugins-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
# the Zabbix server. To do this we spin up a Docker container using the `matrix`
# of version and ports specified earlier.
- name: Zabbix container server provisioning
uses: isbang/compose-action@v1.5.0
uses: hoverkraft-tech/compose-action@v2.0.1
with:
compose-file: "./ansible_collections/community/zabbix/docker-compose.yml"
env:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- zabbix_host - delete denied parameter from interfaces
21 changes: 20 additions & 1 deletion plugins/modules/zabbix_host.py
Original file line number Diff line number Diff line change
Expand Up @@ -966,9 +966,28 @@ def update_exist_interfaces_with_defaults(exist_interfaces):
"privprotocol": 0,
"privpassphrase": ""
}
allowed_fields = [
'hostid',
'type',
'ip',
'dns',
'port',
'useip',
'main',
'details',
'interface_ref',
'items',
'interfaceid'
]
for interface in exist_interfaces:
normalized_interface = interface
denied_fields = list(set(interface.keys()) - set(allowed_fields))
normalized_interface = zabbix_utils.helper_normalize_data(
interface, del_keys=denied_fields
)[0]

new_interface = default_interface.copy()
new_interface.update(interface)
new_interface.update(normalized_interface)
new_interface["details"] = default_interface_details.copy()
if "details" in interface:
new_interface["details"].update(interface["details"])
Expand Down

0 comments on commit 9ebebc7

Please sign in to comment.