diff --git a/changelogs/fragments/5927-set-user-agent-dnsimple.yml b/changelogs/fragments/5927-set-user-agent-dnsimple.yml new file mode 100644 index 00000000000..1082b414818 --- /dev/null +++ b/changelogs/fragments/5927-set-user-agent-dnsimple.yml @@ -0,0 +1,2 @@ +minor_changes: + - "dnsimple - set custom User-Agent for API requests to DNSimple (https://github.com/ansible-collections/community.general/pull/5927)." diff --git a/plugins/modules/dnsimple.py b/plugins/modules/dnsimple.py index e96c22613f2..ddd3ba0babf 100644 --- a/plugins/modules/dnsimple.py +++ b/plugins/modules/dnsimple.py @@ -168,7 +168,7 @@ def __init__(self, account_email, account_api_token, sandbox, module): def dnsimple_client(self): """creates a dnsimple client object""" if self.account_email and self.account_api_token: - client = Client(sandbox=self.sandbox, email=self.account_email, access_token=self.account_api_token) + client = Client(sandbox=self.sandbox, email=self.account_email, access_token=self.account_api_token, user_agent="ansible/community.general") else: msg = "Option account_email or account_api_token not provided. " \ "Dnsimple authentiction with a .dnsimple config file is not " \