test: add support debian 11

This commit is contained in:
Adrien Waksberg 2021-08-24 09:13:44 +02:00
parent 5a3175d750
commit a530f03df0
6 changed files with 32 additions and 9 deletions

View file

@ -11,6 +11,7 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
- feat: add gitlab_pages_url variable - feat: add gitlab_pages_url variable
- feat: add complex variables in config file - feat: add complex variables in config file
- feat: add backup cron - feat: add backup cron
- test: add support debian 11
### Changed ### Changed

View file

@ -8,7 +8,9 @@ Install and configure a Gitlab server
## Requirements ## Requirements
* Ansible >= 2.9 * Ansible >= 2.9
* Debian Buster * Debian
* Buster
* Bullseye
## Role variables ## Role variables
@ -45,7 +47,7 @@ Install and configure a Gitlab server
* install [docker](https://docs.docker.com/engine/installation/) * install [docker](https://docs.docker.com/engine/installation/)
* install `python3` and `python3-pip` * install `python3` and `python3-pip`
* install molecule and dependencies `pip3 install molecule 'molecule[docker]' docker ansible-lint testinfra yamllint` * install molecule and dependencies `pip3 install molecule molecule-docker docker ansible-lint pytest-testinfra yamllint`
* run `molecule test` * run `molecule test`
## License ## License

View file

@ -11,6 +11,7 @@ galaxy_info:
- name: Debian - name: Debian
versions: versions:
- buster - buster
- bullseye
galaxy_tags: galaxy_tags:
- git - git

View file

@ -28,3 +28,7 @@
ansible.builtin.file: ansible.builtin.file:
path: /.dockerenv path: /.dockerenv
state: absent state: absent
- name: update apt cache
ansible.builtin.apt:
update_cache: true

View file

@ -10,13 +10,22 @@ platforms:
command: /bin/systemd command: /bin/systemd
capabilities: capabilities:
- SYS_ADMIN - SYS_ADMIN
exposed_ports: - name: debian11
- 22/tcp image: nishiki/debian11:molecule
published_ports: privileged: true
- 0.0.0.0:2222:22/tcp volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
command: /bin/systemd
capabilities:
- SYS_ADMIN
provisioner:
inventory:
host_vars:
debian11:
gitlab_repository: deb https://packages.gitlab.com/gitlab/gitlab-ce/debian/ buster main
lint: | lint: |
set -e set -e
yamllint . yamllint .
ansible-lint ansible-lint .
verifier: verifier:
name: testinfra name: testinfra

View file

@ -1,4 +1,11 @@
--- ---
- name: install dependencies packages
ansible.builtin.package:
name:
- cron
- gpg
tags: gitlab
- name: add gpg key - name: add gpg key
ansible.builtin.apt_key: ansible.builtin.apt_key:
url: https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey url: https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey
@ -12,7 +19,6 @@
- name: install package - name: install package
ansible.builtin.package: ansible.builtin.package:
name: name:
- cron
- gitlab-ce - gitlab-ce
tags: gitlab tags: gitlab
@ -48,5 +54,5 @@
weekday: '{{ gitlab_backup_cron_weekday|string }}' weekday: '{{ gitlab_backup_cron_weekday|string }}'
day: '{{ gitlab_backup_cron_day|string }}' day: '{{ gitlab_backup_cron_day|string }}'
hour: '{{ gitlab_backup_cron_hour|string }}' hour: '{{ gitlab_backup_cron_hour|string }}'
minute: '{{ gitlab_backup_cron_minute|string }}' minute: '{{ gitlab_backup_cron_minute|string }}'
tags: gitlab tags: gitlab