mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 14:20:22 -07:00
Add firewall and gluster tuned options to oVirt cluster (#52655)
This commit is contained in:
parent
73e7a12c4f
commit
48187d5659
1 changed files with 23 additions and 0 deletions
|
@ -248,6 +248,21 @@ options:
|
||||||
C(id) is required."
|
C(id) is required."
|
||||||
- "This is supported since oVirt version 4.2."
|
- "This is supported since oVirt version 4.2."
|
||||||
version_added: 2.5
|
version_added: 2.5
|
||||||
|
firewall_type:
|
||||||
|
description:
|
||||||
|
- "The type of firewall to be used on hosts in this cluster."
|
||||||
|
- "Up to version 4.1, it was always I(iptables). Since version 4.2, you can choose between I(iptables) and I(firewalld).
|
||||||
|
For clusters with a compatibility version of 4.2 and higher, the default firewall type is I(firewalld)."
|
||||||
|
type: str
|
||||||
|
version_added: 2.8
|
||||||
|
choices: ['firewalld', 'iptables']
|
||||||
|
gluster_tuned_profile:
|
||||||
|
description:
|
||||||
|
- "The name of the U(https://fedorahosted.org/tuned) to set on all the hosts in the cluster. This is not mandatory
|
||||||
|
and relevant only for clusters with Gluster service."
|
||||||
|
- "Could be for example I(virtual-host), I(rhgs-sequential-io), I(rhgs-random-io)"
|
||||||
|
version_added: 2.8
|
||||||
|
type: str
|
||||||
extends_documentation_fragment: ovirt
|
extends_documentation_fragment: ovirt
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
@ -540,6 +555,10 @@ class ClustersModule(BaseModule):
|
||||||
value=str(sp.get('value')),
|
value=str(sp.get('value')),
|
||||||
) for sp in self.param('scheduling_policy_properties') if sp
|
) for sp in self.param('scheduling_policy_properties') if sp
|
||||||
] if self.param('scheduling_policy_properties') is not None else None,
|
] if self.param('scheduling_policy_properties') is not None else None,
|
||||||
|
firewall_type=otypes.FirewallType(
|
||||||
|
self.param('firewall_type')
|
||||||
|
) if self.param('firewall_type') else None,
|
||||||
|
gluster_tuned_profile=self.param('gluster_tuned_profile'),
|
||||||
)
|
)
|
||||||
|
|
||||||
def _matches_entity(self, item, entity):
|
def _matches_entity(self, item, entity):
|
||||||
|
@ -613,6 +632,8 @@ class ClustersModule(BaseModule):
|
||||||
equal(self.param('serial_policy'), str(getattr(entity.serial_number, 'policy', None))) and
|
equal(self.param('serial_policy'), str(getattr(entity.serial_number, 'policy', None))) and
|
||||||
equal(self.param('serial_policy_value'), getattr(entity.serial_number, 'value', None)) and
|
equal(self.param('serial_policy_value'), getattr(entity.serial_number, 'value', None)) and
|
||||||
equal(self.param('scheduling_policy'), getattr(self._connection.follow_link(entity.scheduling_policy), 'name', None)) and
|
equal(self.param('scheduling_policy'), getattr(self._connection.follow_link(entity.scheduling_policy), 'name', None)) and
|
||||||
|
equal(self.param('firewall_type'), str(entity.firewall_type)) and
|
||||||
|
equal(self.param('gluster_tuned_profile'), getattr(entity, 'gluster_tuned_profile', None)) and
|
||||||
equal(self._get_policy_id(), getattr(migration_policy, 'id', None)) and
|
equal(self._get_policy_id(), getattr(migration_policy, 'id', None)) and
|
||||||
equal(self._get_memory_policy(), entity.memory_policy.over_commit.percent) and
|
equal(self._get_memory_policy(), entity.memory_policy.over_commit.percent) and
|
||||||
equal(self.__get_minor(self.param('compatibility_version')), self.__get_minor(entity.version)) and
|
equal(self.__get_minor(self.param('compatibility_version')), self.__get_minor(entity.version)) and
|
||||||
|
@ -685,6 +706,8 @@ def main():
|
||||||
mac_pool=dict(default=None),
|
mac_pool=dict(default=None),
|
||||||
external_network_providers=dict(default=None, type='list'),
|
external_network_providers=dict(default=None, type='list'),
|
||||||
scheduling_policy_properties=dict(type='list'),
|
scheduling_policy_properties=dict(type='list'),
|
||||||
|
firewall_type=dict(choices=['iptables', 'firewalld'], default=None),
|
||||||
|
gluster_tuned_profile=dict(default=None),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(
|
module = AnsibleModule(
|
||||||
argument_spec=argument_spec,
|
argument_spec=argument_spec,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue