1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Correct states in bigip_pool_member (#41035)

Fixes: #40631

The module was not correctly handling a certain state where the node
could be down, but the monitor was enabled on the node.

This patch fixes it.
This commit is contained in:
Tim Rupp 2018-06-01 14:38:23 -07:00 committed by GitHub
parent b578bf9e20
commit 2daf5f3edb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -465,6 +465,8 @@ class ApiParameters(Parameters):
def state(self):
if self._values['state'] in ['user-up', 'unchecked', 'fqdn-up-no-addr'] and self._values['session'] in ['user-enabled']:
return 'present'
elif self._values['state'] == 'down' and self._values['session'] == 'monitor-enabled':
return 'present'
elif self._values['state'] in ['user-down'] and self._values['session'] in ['user-disabled']:
return 'forced_offline'
else: