summaryrefslogtreecommitdiffstats
path: root/roles/lib_dyn/library
diff options
context:
space:
mode:
authorRussell Harrison <rharriso@redhat.com>2016-02-09 13:11:03 -0500
committerRussell Harrison <rharriso@redhat.com>2016-02-09 13:11:03 -0500
commitdbd469ca8aa33e44cc20c402e76d3c962bdf5fbf (patch)
treeec72e19fb8d35acd7844e5a656c194b15e8df3c0 /roles/lib_dyn/library
parentd148f0a39665d7528b854515257aa45ec6739230 (diff)
downloadopenshift-dbd469ca8aa33e44cc20c402e76d3c962bdf5fbf.tar.gz
openshift-dbd469ca8aa33e44cc20c402e76d3c962bdf5fbf.tar.bz2
openshift-dbd469ca8aa33e44cc20c402e76d3c962bdf5fbf.tar.xz
openshift-dbd469ca8aa33e44cc20c402e76d3c962bdf5fbf.zip
Fix a bug with existing CNAME records
Diffstat (limited to 'roles/lib_dyn/library')
-rw-r--r--roles/lib_dyn/library/dyn_record.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/roles/lib_dyn/library/dyn_record.py b/roles/lib_dyn/library/dyn_record.py
index 5e088a674..f2796ccf2 100644
--- a/roles/lib_dyn/library/dyn_record.py
+++ b/roles/lib_dyn/library/dyn_record.py
@@ -224,11 +224,13 @@ def main():
# First get a list of existing records for the node
values = get_record_values(dyn_node_records)
value_key = get_record_key(module.params['record_type'])
+ param_value = module.params['record_value']
# Check to see if the record is already in place before doing anything.
if (dyn_node_records and
dyn_node_records[value_key][0].ttl == module.params['record_ttl'] and
- module.params['record_value'] in values[value_key]):
+ (param_value in values[value_key] or
+ param_value + '.' in values[value_key])):
module.exit_json(changed=False)