From b79806d5d4dcecc5b286a464f43e979fc91aca4f Mon Sep 17 00:00:00 2001 From: Matthew Landauer Date: Tue, 17 Feb 2015 17:13:27 +1100 Subject: [PATCH] If record_value="" write empty value to dns made easy This is necessary for instance when setting CNAMEs that point to the root of the domain. This is different than leaving record_value out completely which has the same behaviour as before --- lib/ansible/modules/extras/network/dnsmadeeasy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/extras/network/dnsmadeeasy.py b/lib/ansible/modules/extras/network/dnsmadeeasy.py index c1f450b2e0..86130f0210 100644 --- a/lib/ansible/modules/extras/network/dnsmadeeasy.py +++ b/lib/ansible/modules/extras/network/dnsmadeeasy.py @@ -275,7 +275,7 @@ def main(): current_record = DME.getRecordByName(record_name) new_record = {'name': record_name} for i in ["record_value", "record_type", "record_ttl"]: - if module.params[i]: + if not module.params[i] is None: new_record[i[len("record_"):]] = module.params[i] # Compare new record against existing one