mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-11 08:34:21 -07:00
Adjust YAML files (#10233)
Adjust YAML files.
(cherry picked from commit eaa5e07b28
)
This commit is contained in:
parent
e8ff74f077
commit
a9e892952d
244 changed files with 7272 additions and 7329 deletions
|
@ -14,137 +14,137 @@
|
|||
state: present
|
||||
|
||||
- block:
|
||||
- name: Create {{ gitlab_project_name }} project
|
||||
gitlab_project:
|
||||
api_url: "{{ gitlab_host }}"
|
||||
validate_certs: true
|
||||
api_token: "{{ gitlab_api_token }}"
|
||||
name: "{{ gitlab_project_name }}"
|
||||
group: "{{ gitlab_project_group }}"
|
||||
default_branch: "{{ gitlab_branch }}"
|
||||
initialize_with_readme: true
|
||||
state: present
|
||||
- name: Create {{ gitlab_project_name }} project
|
||||
gitlab_project:
|
||||
api_url: "{{ gitlab_host }}"
|
||||
validate_certs: true
|
||||
api_token: "{{ gitlab_api_token }}"
|
||||
name: "{{ gitlab_project_name }}"
|
||||
group: "{{ gitlab_project_group }}"
|
||||
default_branch: "{{ gitlab_branch }}"
|
||||
initialize_with_readme: true
|
||||
state: present
|
||||
|
||||
- name: Create Issue
|
||||
gitlab_issue:
|
||||
api_token: "{{ gitlab_api_token }}"
|
||||
api_url: "{{ gitlab_host }}"
|
||||
description: "Test description"
|
||||
project: "{{ gitlab_project_group }}/{{ gitlab_project_name }}"
|
||||
state: present
|
||||
title: "Ansible test issue"
|
||||
register: gitlab_issue_create
|
||||
- name: Create Issue
|
||||
gitlab_issue:
|
||||
api_token: "{{ gitlab_api_token }}"
|
||||
api_url: "{{ gitlab_host }}"
|
||||
description: "Test description"
|
||||
project: "{{ gitlab_project_group }}/{{ gitlab_project_name }}"
|
||||
state: present
|
||||
title: "Ansible test issue"
|
||||
register: gitlab_issue_create
|
||||
|
||||
- name: Test Issue Created
|
||||
assert:
|
||||
that:
|
||||
- gitlab_issue_create is changed
|
||||
- name: Test Issue Created
|
||||
assert:
|
||||
that:
|
||||
- gitlab_issue_create is changed
|
||||
|
||||
- name: Create Issue ( Idempotency test )
|
||||
gitlab_issue:
|
||||
api_token: "{{ gitlab_api_token }}"
|
||||
api_url: "{{ gitlab_host }}"
|
||||
description: "Test description"
|
||||
project: "{{ gitlab_project_group }}/{{ gitlab_project_name }}"
|
||||
state: present
|
||||
title: "Ansible test issue"
|
||||
register: gitlab_issue_create_idempotence
|
||||
- name: Create Issue ( Idempotency test )
|
||||
gitlab_issue:
|
||||
api_token: "{{ gitlab_api_token }}"
|
||||
api_url: "{{ gitlab_host }}"
|
||||
description: "Test description"
|
||||
project: "{{ gitlab_project_group }}/{{ gitlab_project_name }}"
|
||||
state: present
|
||||
title: "Ansible test issue"
|
||||
register: gitlab_issue_create_idempotence
|
||||
|
||||
- name: Test Create Issue is Idempotent
|
||||
assert:
|
||||
that:
|
||||
- gitlab_issue_create_idempotence is not changed
|
||||
- name: Test Create Issue is Idempotent
|
||||
assert:
|
||||
that:
|
||||
- gitlab_issue_create_idempotence is not changed
|
||||
|
||||
- name: Update Issue Test ( Additions )
|
||||
gitlab_issue:
|
||||
api_token: "{{ gitlab_api_token }}"
|
||||
api_url: "{{ gitlab_host }}"
|
||||
assignee_ids: "{{ gitlab_assignee_ids }}"
|
||||
description_path: "{{ gitlab_description_path }}"
|
||||
labels: "{{ gitlab_labels }}"
|
||||
milestone_search: "{{ gitlab_milestone_search }}"
|
||||
milestone_group_id: "{{ gitlab_milestone_group_id }}"
|
||||
project: "{{ gitlab_project_group }}/{{ gitlab_project_name }}"
|
||||
state: present
|
||||
title: "Ansible test issue"
|
||||
register: gitlab_issue_update_additions
|
||||
- name: Update Issue Test ( Additions )
|
||||
gitlab_issue:
|
||||
api_token: "{{ gitlab_api_token }}"
|
||||
api_url: "{{ gitlab_host }}"
|
||||
assignee_ids: "{{ gitlab_assignee_ids }}"
|
||||
description_path: "{{ gitlab_description_path }}"
|
||||
labels: "{{ gitlab_labels }}"
|
||||
milestone_search: "{{ gitlab_milestone_search }}"
|
||||
milestone_group_id: "{{ gitlab_milestone_group_id }}"
|
||||
project: "{{ gitlab_project_group }}/{{ gitlab_project_name }}"
|
||||
state: present
|
||||
title: "Ansible test issue"
|
||||
register: gitlab_issue_update_additions
|
||||
|
||||
- name: Test Issue Updated ( Additions )
|
||||
assert:
|
||||
that:
|
||||
- gitlab_issue_update_additions.issue.labels[0] == "{{ gitlab_labels[0] }}"
|
||||
- gitlab_issue_update_additions.issue.assignees[0].username == "{{ gitlab_assignee_ids[0] }}"
|
||||
- "'### Description\n\nIssue test description' in gitlab_issue_update_additions.issue.description"
|
||||
- gitlab_issue_update_additions.issue.milestone.title == "{{ gitlab_milestone_search }}"
|
||||
- name: Test Issue Updated ( Additions )
|
||||
assert:
|
||||
that:
|
||||
- gitlab_issue_update_additions.issue.labels[0] == "{{ gitlab_labels[0] }}"
|
||||
- gitlab_issue_update_additions.issue.assignees[0].username == "{{ gitlab_assignee_ids[0] }}"
|
||||
- "'### Description\n\nIssue test description' in gitlab_issue_update_additions.issue.description"
|
||||
- gitlab_issue_update_additions.issue.milestone.title == "{{ gitlab_milestone_search }}"
|
||||
|
||||
- name: Update Issue Test ( Persistence )
|
||||
gitlab_issue:
|
||||
api_token: "{{ gitlab_api_token }}"
|
||||
api_url: "{{ gitlab_host }}"
|
||||
description_path: "{{ gitlab_description_path }}"
|
||||
milestone_search: "{{ gitlab_milestone_search }}"
|
||||
milestone_group_id: "{{ gitlab_milestone_group_id }}"
|
||||
project: "{{ gitlab_project_group }}/{{ gitlab_project_name }}"
|
||||
state: present
|
||||
title: "Ansible test issue"
|
||||
register: gitlab_issue_update_persistence
|
||||
- name: Update Issue Test ( Persistence )
|
||||
gitlab_issue:
|
||||
api_token: "{{ gitlab_api_token }}"
|
||||
api_url: "{{ gitlab_host }}"
|
||||
description_path: "{{ gitlab_description_path }}"
|
||||
milestone_search: "{{ gitlab_milestone_search }}"
|
||||
milestone_group_id: "{{ gitlab_milestone_group_id }}"
|
||||
project: "{{ gitlab_project_group }}/{{ gitlab_project_name }}"
|
||||
state: present
|
||||
title: "Ansible test issue"
|
||||
register: gitlab_issue_update_persistence
|
||||
|
||||
- name: Test issue Not Updated ( Persistence )
|
||||
assert:
|
||||
that:
|
||||
- gitlab_issue_update_persistence.issue.labels[0] == "{{ gitlab_labels[0] }}"
|
||||
- gitlab_issue_update_persistence.issue.assignees[0].username == "{{ gitlab_assignee_ids[0] }}"
|
||||
- name: Test issue Not Updated ( Persistence )
|
||||
assert:
|
||||
that:
|
||||
- gitlab_issue_update_persistence.issue.labels[0] == "{{ gitlab_labels[0] }}"
|
||||
- gitlab_issue_update_persistence.issue.assignees[0].username == "{{ gitlab_assignee_ids[0] }}"
|
||||
|
||||
- name: Update Issue Test ( Removals )
|
||||
gitlab_issue:
|
||||
api_token: "{{ gitlab_api_token }}"
|
||||
api_url: "{{ gitlab_host }}"
|
||||
assignee_ids: []
|
||||
description_path: "{{ gitlab_description_path }}"
|
||||
labels: []
|
||||
milestone_search: ""
|
||||
milestone_group_id: ""
|
||||
project: "{{ gitlab_project_group }}/{{ gitlab_project_name }}"
|
||||
state: present
|
||||
title: "Ansible test issue"
|
||||
register: gitlab_issue_update_removal
|
||||
- name: Update Issue Test ( Removals )
|
||||
gitlab_issue:
|
||||
api_token: "{{ gitlab_api_token }}"
|
||||
api_url: "{{ gitlab_host }}"
|
||||
assignee_ids: []
|
||||
description_path: "{{ gitlab_description_path }}"
|
||||
labels: []
|
||||
milestone_search: ""
|
||||
milestone_group_id: ""
|
||||
project: "{{ gitlab_project_group }}/{{ gitlab_project_name }}"
|
||||
state: present
|
||||
title: "Ansible test issue"
|
||||
register: gitlab_issue_update_removal
|
||||
|
||||
- name: Test issue updated
|
||||
assert:
|
||||
that:
|
||||
- gitlab_issue_update_removal.issue.labels == []
|
||||
- gitlab_issue_update_removal.issue.assignees == []
|
||||
- gitlab_issue_update_removal.issue.milestone == None
|
||||
- name: Test issue updated
|
||||
assert:
|
||||
that:
|
||||
- gitlab_issue_update_removal.issue.labels == []
|
||||
- gitlab_issue_update_removal.issue.assignees == []
|
||||
- gitlab_issue_update_removal.issue.milestone == None
|
||||
|
||||
- name: Delete Issue
|
||||
gitlab_issue:
|
||||
api_url: "{{ gitlab_host }}"
|
||||
api_token: "{{ gitlab_api_token }}"
|
||||
project: "{{ gitlab_project_group }}/{{ gitlab_project_name }}"
|
||||
title: "Ansible test issue"
|
||||
state: absent
|
||||
register: gitlab_issue_delete
|
||||
- name: Delete Issue
|
||||
gitlab_issue:
|
||||
api_url: "{{ gitlab_host }}"
|
||||
api_token: "{{ gitlab_api_token }}"
|
||||
project: "{{ gitlab_project_group }}/{{ gitlab_project_name }}"
|
||||
title: "Ansible test issue"
|
||||
state: absent
|
||||
register: gitlab_issue_delete
|
||||
|
||||
- name: Test issue is deleted
|
||||
assert:
|
||||
that:
|
||||
- gitlab_issue_delete is changed
|
||||
- name: Test issue is deleted
|
||||
assert:
|
||||
that:
|
||||
- gitlab_issue_delete is changed
|
||||
|
||||
always:
|
||||
- name: Delete Issue
|
||||
gitlab_issue:
|
||||
api_url: "{{ gitlab_host }}"
|
||||
api_token: "{{ gitlab_api_token }}"
|
||||
project: "{{ gitlab_project_group }}/{{ gitlab_project_name }}"
|
||||
title: "Ansible test issue"
|
||||
state_filter: "opened"
|
||||
state: absent
|
||||
register: gitlab_issue_delete
|
||||
- name: Clean up {{ gitlab_project_name }}
|
||||
gitlab_project:
|
||||
api_url: "{{ gitlab_host }}"
|
||||
validate_certs: false
|
||||
api_token: "{{ gitlab_api_token }}"
|
||||
name: "{{ gitlab_project_name }}"
|
||||
group: "{{ gitlab_project_group }}"
|
||||
state: absent
|
||||
- name: Delete Issue
|
||||
gitlab_issue:
|
||||
api_url: "{{ gitlab_host }}"
|
||||
api_token: "{{ gitlab_api_token }}"
|
||||
project: "{{ gitlab_project_group }}/{{ gitlab_project_name }}"
|
||||
title: "Ansible test issue"
|
||||
state_filter: "opened"
|
||||
state: absent
|
||||
register: gitlab_issue_delete
|
||||
- name: Clean up {{ gitlab_project_name }}
|
||||
gitlab_project:
|
||||
api_url: "{{ gitlab_host }}"
|
||||
validate_certs: false
|
||||
api_token: "{{ gitlab_api_token }}"
|
||||
name: "{{ gitlab_project_name }}"
|
||||
group: "{{ gitlab_project_group }}"
|
||||
state: absent
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue