Fixes an fqdn error (#31745)

the pool module was not correctly interpreting the partitions
in the monitors list vs the partition at the task level. This patch
fixes that.
This commit is contained in:
Tim Rupp 2017-10-14 15:39:18 -07:00 committed by GitHub
commit 6e6a6ff36b

View file

@ -110,7 +110,7 @@ options:
default: Common default: Common
version_added: 2.5 version_added: 2.5
notes: notes:
- Requires BIG-IP software version >= 11. - Requires BIG-IP software version >= 12.
- F5 developed module 'F5-SDK' required (https://github.com/F5Networks/f5-common-python). - F5 developed module 'F5-SDK' required (https://github.com/F5Networks/f5-common-python).
- Best run as a local_action in your playbook. - Best run as a local_action in your playbook.
requirements: requirements:
@ -399,12 +399,9 @@ class Parameters(AnsibleF5Parameters):
return lb_method return lb_method
def _fqdn_name(self, value): def _fqdn_name(self, value):
if value.startswith('/'): if value is not None and not value.startswith('/'):
name = os.path.basename(value) return '/{0}/{1}'.format(self.partition, value)
result = '/{0}/{1}'.format(self.partition, name) return value
else:
result = '/{0}/{1}'.format(self.partition, value)
return result
@property @property
def monitors_list(self): def monitors_list(self):