From 855cbd67aed46e9cae30fda61535fa21183a40bb Mon Sep 17 00:00:00 2001 From: lapete Date: Wed, 25 Jan 2023 23:03:35 +0100 Subject: [PATCH] Update gitlab_deploy_key.py (#5888) * Update gitlab_deploy_key.py Change key title on key update * Create 5888-update-key-title Add changelog fragment for key title change * Update changelogs/fragments/5888-update-key-title Co-authored-by: Felix Fontein * Rename 5888-update-key-title to 5888-update-key-title.yml Co-authored-by: Felix Fontein --- changelogs/fragments/5888-update-key-title.yml | 2 ++ plugins/modules/gitlab_deploy_key.py | 1 + 2 files changed, 3 insertions(+) create mode 100644 changelogs/fragments/5888-update-key-title.yml diff --git a/changelogs/fragments/5888-update-key-title.yml b/changelogs/fragments/5888-update-key-title.yml new file mode 100644 index 0000000000..e620ad3d79 --- /dev/null +++ b/changelogs/fragments/5888-update-key-title.yml @@ -0,0 +1,2 @@ +minor_changes: + - gitlab_deploy_key - also update ``title`` and not just ``can_push`` (https://github.com/ansible-collections/community.general/pull/5888). diff --git a/plugins/modules/gitlab_deploy_key.py b/plugins/modules/gitlab_deploy_key.py index 3ed2b2d7a5..f4a9fb29fa 100644 --- a/plugins/modules/gitlab_deploy_key.py +++ b/plugins/modules/gitlab_deploy_key.py @@ -151,6 +151,7 @@ class GitLabDeployKey(object): changed = True else: changed, deploy_key = self.update_deploy_key(self.deploy_key_object, { + 'title': key_title, 'can_push': options['can_push']}) self.deploy_key_object = deploy_key