summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndra Machacek <machacek.ondra@gmail.com>2019-02-26 12:00:11 +0100
committeransibot <ansibot@users.noreply.github.com>2019-02-26 06:00:11 -0500
commit48187d56592137610d4301bdcc7c34167a675d75 (patch)
tree5104f86c61b4c49744d332038bdd82f0b580553f
parent73e7a12c4f37e3e1184abd7800292882958bec56 (diff)
downloadansible-48187d56592137610d4301bdcc7c34167a675d75.tar.gz
Add firewall and gluster tuned options to oVirt cluster (#52655)
-rw-r--r--lib/ansible/modules/cloud/ovirt/ovirt_cluster.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_cluster.py b/lib/ansible/modules/cloud/ovirt/ovirt_cluster.py
index e31ab45561..9957808251 100644
--- a/lib/ansible/modules/cloud/ovirt/ovirt_cluster.py
+++ b/lib/ansible/modules/cloud/ovirt/ovirt_cluster.py
@@ -248,6 +248,21 @@ options:
C(id) is required."
- "This is supported since oVirt version 4.2."
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
'''
@@ -540,6 +555,10 @@ class ClustersModule(BaseModule):
value=str(sp.get('value')),
) for sp in self.param('scheduling_policy_properties') if sp
] 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):
@@ -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_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('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_memory_policy(), entity.memory_policy.over_commit.percent) 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),
external_network_providers=dict(default=None, type='list'),
scheduling_policy_properties=dict(type='list'),
+ firewall_type=dict(choices=['iptables', 'firewalld'], default=None),
+ gluster_tuned_profile=dict(default=None),
)
module = AnsibleModule(
argument_spec=argument_spec,