Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions plugins/modules/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ def _configure_payload(self):
payload['authentication'] = dict(publicKey=self.public_key_text)

if self.freeipa is not None:
payload['freeIpa'] = dict(instanceCountByGroup=self.freeipa)
payload['freeIpa'] = dict(instanceCountByGroup=self.freeipa['instanceCountByGroup'])

if self.vpc_id is not None:
payload['vpcId'] = self.vpc_id
Expand Down Expand Up @@ -875,6 +875,8 @@ def _configure_payload(self):
)
payload['usePublicIp'] = self.public_ip
payload['logStorage'] = dict(serviceAccountEmail=self.log_identity, storageLocationBase=self.log_location)
if self.freeipa is not None:
payload['freeIpa'] = dict(instanceCountByGroup=self.freeipa['instanceCountByGroup'])
else:
# For Azure
payload['securityAccess'] = dict(defaultSecurityGroupId=self.default_sg,
Expand All @@ -886,6 +888,8 @@ def _configure_payload(self):
payload['existingNetworkParams'] = dict(
networkId=self.vpc_id, resourceGroupName=self.resource_gp, subnetIds=self.subnet_ids
)
if self.freeipa is not None:
payload['freeIpa'] = dict(instanceCountByGroup=self.freeipa['instanceCountByGroup'])

return payload

Expand Down Expand Up @@ -928,7 +932,7 @@ def _reconcile_existing_state(self, existing):
if self.description is not None and existing['description'] != self.description:
mismatch.append(['description', existing['description']])

if self.freeipa is not None and len(existing['freeipa']['serverIP']) != self.freeipa:
if self.freeipa is not None and len(existing['freeipa']['serverIP']) != self.freeipa['instanceCountByGroup']:
mismatch.append(['freeipa', len(existing['freeipa']['serverIP'])])

if self.vpc_id is not None and existing['network']['aws']['vpcId'] != self.vpc_id:
Expand Down