From 81a81ad759f6b9c66daa67b54b2ca7905ed5266e Mon Sep 17 00:00:00 2001 From: Travis Holton Date: Mon, 15 Aug 2022 11:20:12 +1200 Subject: [PATCH] Add floating_ip_enabled flag to coe_cluster creation * Pass option as true if present * False if not present Change-Id: I44eaa8ee99386fdbd5020b36711b13b17db29b7b --- plugins/modules/coe_cluster.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/plugins/modules/coe_cluster.py b/plugins/modules/coe_cluster.py index 1c72c969..f319de3f 100644 --- a/plugins/modules/coe_cluster.py +++ b/plugins/modules/coe_cluster.py @@ -29,6 +29,11 @@ options: description: - The flavor of the minion node for this ClusterTemplate type: str + floating_ip_enabled: + description: + - Indicates whether created Clusters should have a floating ip + type: bool + default: false keypair: description: - Name of the keypair to use. @@ -132,6 +137,11 @@ cluster: - The flavor of the minion node for this cluster type: str sample: c1.c1r1 + floating_ip_enabled: + description: + - Indicates whether created Clusters should have a floating ip + type: bool + sample: true keypair: description: - Name of the keypair to use. @@ -216,6 +226,7 @@ class CoeClusterModule(OpenStackModule): discovery_url=dict(), docker_volume_size=dict(type='int'), flavor_id=dict(), + floating_ip_enabled=dict(type='bool', default=False), keypair=dict(no_log=False), labels=dict(type='raw'), master_count=dict(type='int', default=1), @@ -249,6 +260,7 @@ class CoeClusterModule(OpenStackModule): discovery_url=self.params['discovery_url'], docker_volume_size=self.params['docker_volume_size'], flavor_id=self.params['flavor_id'], + floating_ip_enabled=self.params['floating_ip_enabled'], keypair=self.params['keypair'], labels=self._parse_labels(params['labels']), master_count=self.params['master_count'],