diff options
author | Russell Harrison <rharrison@fedoraproject.org> | 2016-02-10 12:25:48 -0500 |
---|---|---|
committer | Russell Harrison <rharrison@fedoraproject.org> | 2016-02-10 12:25:48 -0500 |
commit | 987a26d1cae917eedf9062cde8d4d70d9b466000 (patch) | |
tree | e7654d9f2b8a30729289017ca922aa11c047d106 | |
parent | dbd456f5965d857731958460c975318d1ddc9866 (diff) | |
parent | dbd469ca8aa33e44cc20c402e76d3c962bdf5fbf (diff) | |
download | openshift-987a26d1cae917eedf9062cde8d4d70d9b466000.tar.gz openshift-987a26d1cae917eedf9062cde8d4d70d9b466000.tar.bz2 openshift-987a26d1cae917eedf9062cde8d4d70d9b466000.tar.xz openshift-987a26d1cae917eedf9062cde8d4d70d9b466000.zip |
Merge pull request #1359 from rharrison10/rharriso/dyn
Fix a bug with existing CNAME records
-rw-r--r-- | roles/lib_dyn/library/dyn_record.py | 4 | ||||
-rw-r--r-- | roles/lib_dyn/tasks/main.yml | 2 |
2 files changed, 5 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) diff --git a/roles/lib_dyn/tasks/main.yml b/roles/lib_dyn/tasks/main.yml index 9b3b1b0b9..965962928 100644 --- a/roles/lib_dyn/tasks/main.yml +++ b/roles/lib_dyn/tasks/main.yml @@ -3,3 +3,5 @@ - name: Make sure python-dyn is installed yum: name=python-dyn state=present + tags: + - lib_dyn |