Gitlab-CI: ansible-lint

This commit is contained in:
Michael Grote 2021-01-27 09:15:34 +01:00
parent e36890f85c
commit f2870ade36
8 changed files with 27 additions and 31 deletions

13
.gitlab-ci.yml Normal file
View file

@ -0,0 +1,13 @@
image: python:3-slim
before_script:
- pip install ansible-lint
- ansible-lint --version
stages:
- ansible-lint
ansible-lint:
stage: ansible-lint
script:
- ansible-lint .

3
.gitmodules vendored
View file

@ -37,3 +37,6 @@
[submodule "roles/geerlingguy.gitlab"]
path = roles/geerlingguy.gitlab
url = https://github.com/geerlingguy/ansible-role-gitlab
[submodule "roles/riemers.gitlab-runner"]
path = roles/riemers.gitlab-runner
url = https://github.com/riemers/ansible-gitlab-runner

View file

@ -9,3 +9,12 @@
pip_package: python3-pip
pip_install_packages:
- name: python-gitlab
### riemers.gitlab-runner
gitlab_runner_coordinator_url: https://git.mgrote.net
gitlab_runner_registration_token: "{{ lookup('keepass', 'gitlab_runner_registration_token', 'password') }}"
gitlab_runner_runners:
- name: "{{ ansible_hostname }}-docker"
executor: docker
docker_image: 'alpine'
docker_volumes:
- "/var/run/docker.sock:/var/run/docker.sock"

View file

@ -1,10 +0,0 @@
---
### mgrote.gitlab-runner
gitlab_runner:
- api_url: https://git.mgrote.net
registration_token: "{{ lookup('keepass', 'gitlab_runner_registration_token', 'password') }}"
api_token: "{{ lookup('keepass', 'gitlab_runner_api_token', 'password') }}" #Token: ansible-gitlab-runner
api_username: root
description: "{{ ansible_hostname }}"
active: "false"
state: "absent"

View file

@ -1,10 +0,0 @@
---
### mgrote.gitlab-runner
gitlab_runner:
- api_url: https://git.mgrote.net
registration_token: "{{ lookup('keepass', 'gitlab_runner_registration_token', 'password') }}"
api_token: "{{ lookup('keepass', 'gitlab_runner_api_token', 'password') }}" #Token: ansible-gitlab-runner
api_username: root
description: "{{ ansible_hostname }}"
active: "false"
state: "absent"

View file

@ -1,10 +0,0 @@
---
### mgrote.gitlab-runner
gitlab_runner:
- api_url: https://git.mgrote.net
registration_token: "{{ lookup('keepass', 'gitlab_runner_registration_token', 'password') }}"
api_token: "{{ lookup('keepass', 'gitlab_runner_api_token', 'password') }}" #Token: ansible-gitlab-runner
api_username: root
description: "{{ ansible_hostname }}"
active: "true"
state: "present"

View file

@ -4,4 +4,4 @@
- { role: geerlingguy.pip, tags: "pip", become: true }
- { role: geerlingguy.docker, tags: "docker", become: true }
- { role: gantsign.ctop, tags: "ctop", become: true }
- { role: mgrote.gitlab-runner, tags: "gitlab-runner", become: true }
- { role: riemers.gitlab-runner, tags: "gitlab-runner", become: true }

@ -0,0 +1 @@
Subproject commit 860652c8a2b61d2b93a42aaca6895caaf757afef