mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 13:20:23 -07:00
Initial commit
This commit is contained in:
commit
aebc1b03fd
4861 changed files with 812621 additions and 0 deletions
3
tests/integration/targets/gitlab_project/aliases
Normal file
3
tests/integration/targets/gitlab_project/aliases
Normal file
|
@ -0,0 +1,3 @@
|
|||
shippable/posix/group1
|
||||
gitlab/ci
|
||||
disabled
|
|
@ -0,0 +1,2 @@
|
|||
gitlab_project_name: ansible_test_project
|
||||
gitlab_deploy_key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJnTYY7CYk1F/wBklpdRxudxN6KeXgfhutkiCigSfPhe ansible_test"
|
40
tests/integration/targets/gitlab_project/tasks/main.yml
Normal file
40
tests/integration/targets/gitlab_project/tasks/main.yml
Normal file
|
@ -0,0 +1,40 @@
|
|||
- name: Install required libs
|
||||
pip:
|
||||
name: python-gitlab
|
||||
state: present
|
||||
|
||||
- name: Clean up {{ gitlab_project_name }}
|
||||
gitlab_project:
|
||||
server_url: "{{ gitlab_host }}"
|
||||
validate_certs: False
|
||||
login_token: "{{ gitlab_login_token }}"
|
||||
name: "{{ gitlab_project_name }}"
|
||||
state: absent
|
||||
|
||||
- name: Create {{ gitlab_project_name }}
|
||||
gitlab_project:
|
||||
server_url: "{{ gitlab_host }}"
|
||||
validate_certs: False
|
||||
login_token: "{{ gitlab_login_token }}"
|
||||
name: "{{ gitlab_project_name }}"
|
||||
state: present
|
||||
register: gitlab_project_state
|
||||
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- gitlab_project_state is changed
|
||||
|
||||
- name: Create {{ gitlab_project_name }} (Test idempotency)
|
||||
gitlab_project:
|
||||
server_url: "{{ gitlab_host }}"
|
||||
validate_certs: False
|
||||
login_token: "{{ gitlab_login_token }}"
|
||||
name: "{{ gitlab_project_name }}"
|
||||
state: present
|
||||
register: gitlab_project_state_again
|
||||
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- gitlab_project_state_again is not changed
|
Loading…
Add table
Add a link
Reference in a new issue