diff --git a/lib/ansible/modules/extras/network/cloudflare_dns.py b/lib/ansible/modules/extras/network/cloudflare_dns.py index 8772c2ac65..3e5ba50b52 100644 --- a/lib/ansible/modules/extras/network/cloudflare_dns.py +++ b/lib/ansible/modules/extras/network/cloudflare_dns.py @@ -438,7 +438,7 @@ class CloudflareAPI(object): "port": params['port'], "weight": params['weight'], "priority": params['priority'], - "name": params['record'], + "name": params['record'][:-len('.' + params['zone'])], "proto": params['proto'], "service": params['service'] }