From a146eb3118dbc0cad3361a0fac00921c0bbac264 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Thu, 26 Jan 2023 06:23:51 +0100 Subject: [PATCH] [PR #5888/855cbd67 backport][stable-6] Update gitlab_deploy_key.py (#5896) 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 (cherry picked from commit 855cbd67aed46e9cae30fda61535fa21183a40bb) Co-authored-by: lapete --- 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