-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitlab_repos.yml
executable file
·42 lines (37 loc) · 1.16 KB
/
gitlab_repos.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env ansible-playbook
---
- name: configure gitlab repository
hosts: localhost
become: false
gather_facts: false
vars:
namespace: buluma
vars_files:
# - defaults/main.yml
- vars/main.yml
- vars/vault.yml
tasks:
- name: Create GitLab Project in group Ansible
gitlab_project:
api_url: https://gitlab.com/
validate_certs: True
# api_username: buluma
api_token: "{{ gitlab_private_token }}"
name: my_first_project
group: buluma_ansible
issues_enabled: False
wiki_enabled: True
snippets_enabled: True
import_url: https://github.com/buluma/ansible-role-bootstrap.git
state: present
delegate_to: localhost
- name: list pipelines
uri:
# url: "https://gitlab.com/api/v4/projects/{{ encoded_path }}/pipeline_schedules"
url: "https://gitlab.com/api/v4/projects/buluma_ansible/my_first_project/pipeline_schedules"
method: GET
headers:
PRIVATE-TOKEN: "{{ gitlab_private_token }}"
register: gitlab_schedules
- name: check gitlab_schedules
ansible.builtin.debug: var=gitlab_schedules