mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-05 05:34:22 -07:00
Feature/gitlab deploykey updkey (#1661)
* feat(gitlab-deploy-key): automatically update ... ... the public key * add integrity test * fix sanity issues * added changelog fragment Co-authored-by: Mirko Wilhelmi <Mirko.Wilhelmi@sma.de>
This commit is contained in:
parent
f509f2c896
commit
dd0b54b9b5
4 changed files with 45 additions and 0 deletions
|
@ -39,3 +39,35 @@
|
|||
- assert:
|
||||
that:
|
||||
- deploy_key_status is changed
|
||||
- deploy_key_status.deploy_key.key == gitlab_deploy_key
|
||||
|
||||
|
||||
- name: Update public key {{ gitlab_project_name }} (change expected)
|
||||
gitlab_deploy_key:
|
||||
login_token: "{{ gitlab_login_token }}"
|
||||
project: "root/{{ gitlab_project_name }}"
|
||||
server_url: "{{ gitlab_host }}"
|
||||
title: "{{ gitlab_project_name }}"
|
||||
key: "{{ gitlab_deploy_key_new }}"
|
||||
state: present
|
||||
register: deploy_key_status
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- deploy_key_status is changed
|
||||
- deploy_key_status.deploy_key.key == gitlab_deploy_key_new
|
||||
|
||||
- name: Update public key {{ gitlab_project_name }} (no change expected)
|
||||
gitlab_deploy_key:
|
||||
login_token: "{{ gitlab_login_token }}"
|
||||
project: "root/{{ gitlab_project_name }}"
|
||||
server_url: "{{ gitlab_host }}"
|
||||
title: "{{ gitlab_project_name }}"
|
||||
key: "{{ gitlab_deploy_key_new }}"
|
||||
state: present
|
||||
register: deploy_key_status
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- not deploy_key_status.changed
|
||||
- deploy_key_status.deploy_key.key == gitlab_deploy_key_new
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue