From 3959597f7de04ead8fbec07d4cb48540bb3b67b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Moser?= Date: Tue, 25 Apr 2017 13:05:37 +0200 Subject: [PATCH] exoscale: fix TXT type records handling (#23956) --- lib/ansible/modules/network/exoscale/exo_dns_record.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ansible/modules/network/exoscale/exo_dns_record.py b/lib/ansible/modules/network/exoscale/exo_dns_record.py index 72de649d091..0e19c87da03 100644 --- a/lib/ansible/modules/network/exoscale/exo_dns_record.py +++ b/lib/ansible/modules/network/exoscale/exo_dns_record.py @@ -276,10 +276,6 @@ class ExoDnsRecord(ExoDns): def __init__(self, module): super(ExoDnsRecord, self).__init__(module) - self.content = self.module.params.get('content') - if self.content: - self.content = self.content.lower() - self.domain = self.module.params.get('domain').lower() self.name = self.module.params.get('name').lower() if self.name == self.domain: @@ -290,6 +286,10 @@ class ExoDnsRecord(ExoDns): if self.multiple and self.record_type != 'A': self.module.fail_json(msg="Multiple is only usable with record_type A") + self.content = self.module.params.get('content') + if self.content and self.record_type != 'TXT': + self.content = self.content.lower() + def _create_record(self, record): self.result['changed'] = True data = {