mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 13:20:23 -07:00
VMware: add missing fact about IP network in firewall facts (#52554)
Fixes: #52526 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
681082e47c
commit
c3777a6e54
1 changed files with 8 additions and 1 deletions
|
@ -67,7 +67,13 @@ hosts_firewall_facts:
|
|||
{
|
||||
"allowed_hosts": {
|
||||
"all_ip": true,
|
||||
"ip_address": []
|
||||
"ip_address": [
|
||||
"10.10.10.1",
|
||||
],
|
||||
"ip_network": [
|
||||
"11.111.112.0/22",
|
||||
"192.168.10.1/24"
|
||||
],
|
||||
},
|
||||
"enabled": true,
|
||||
"key": "CIMHttpServer",
|
||||
|
@ -117,6 +123,7 @@ class FirewallFactsManager(PyVmomi):
|
|||
allowed_host = rule_obj.allowedHosts
|
||||
rule_allow_host = dict()
|
||||
rule_allow_host['ip_address'] = [ip for ip in allowed_host.ipAddress]
|
||||
rule_allow_host['ip_network'] = [ip.network + "/" + str(ip.prefixLength) for ip in allowed_host.ipNetwork]
|
||||
rule_allow_host['all_ip'] = allowed_host.allIp
|
||||
rule_dict['allowed_hosts'] = rule_allow_host
|
||||
return rule_dict
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue