Build Windows Templates in RHV
This commit is contained in:
4
roles/geerlingguy.gitlab/.ansible-lint
Normal file
4
roles/geerlingguy.gitlab/.ansible-lint
Normal file
@@ -0,0 +1,4 @@
|
||||
skip_list:
|
||||
- 'yaml'
|
||||
- 'role-name'
|
||||
- 'package-latest'
|
||||
75
roles/geerlingguy.gitlab/.github/workflows/ci.yml
vendored
Normal file
75
roles/geerlingguy.gitlab/.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
---
|
||||
name: CI
|
||||
'on':
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
schedule:
|
||||
- cron: "0 7 * * 1"
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: 'geerlingguy.gitlab'
|
||||
|
||||
jobs:
|
||||
|
||||
lint:
|
||||
name: Lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out the codebase.
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: 'geerlingguy.gitlab'
|
||||
|
||||
- name: Set up Python 3.
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Install test dependencies.
|
||||
run: pip3 install yamllint
|
||||
|
||||
- name: Lint code.
|
||||
run: |
|
||||
yamllint .
|
||||
|
||||
molecule:
|
||||
name: Molecule
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- distro: centos7
|
||||
playbook: converge.yml
|
||||
- distro: ubuntu1804
|
||||
playbook: converge.yml
|
||||
- distro: debian9
|
||||
playbook: converge.yml
|
||||
- distro: centos7
|
||||
playbook: version.yml
|
||||
- distro: ubuntu1804
|
||||
playbook: version.yml
|
||||
|
||||
steps:
|
||||
- name: Check out the codebase.
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: 'geerlingguy.gitlab'
|
||||
|
||||
- name: Set up Python 3.
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Install test dependencies.
|
||||
run: pip3 install ansible molecule[docker] docker
|
||||
|
||||
- name: Run Molecule tests.
|
||||
run: molecule test
|
||||
env:
|
||||
PY_COLORS: '1'
|
||||
ANSIBLE_FORCE_COLOR: '1'
|
||||
MOLECULE_DISTRO: ${{ matrix.distro }}
|
||||
MOLECULE_PLAYBOOK: ${{ matrix.playbook }}
|
||||
38
roles/geerlingguy.gitlab/.github/workflows/release.yml
vendored
Normal file
38
roles/geerlingguy.gitlab/.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
# This workflow requires a GALAXY_API_KEY secret present in the GitHub
|
||||
# repository or organization.
|
||||
#
|
||||
# See: https://github.com/marketplace/actions/publish-ansible-role-to-galaxy
|
||||
# See: https://github.com/ansible/galaxy/issues/46
|
||||
|
||||
name: Release
|
||||
'on':
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: 'geerlingguy.gitlab'
|
||||
|
||||
jobs:
|
||||
|
||||
release:
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out the codebase.
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: 'geerlingguy.gitlab'
|
||||
|
||||
- name: Set up Python 3.
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Install Ansible.
|
||||
run: pip3 install ansible-base
|
||||
|
||||
- name: Trigger a new import on Galaxy.
|
||||
run: ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }} $(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2)
|
||||
@@ -1,2 +1,2 @@
|
||||
install_date: Tue Apr 20 16:13:49 2021
|
||||
install_date: Wed Apr 21 16:48:33 2021
|
||||
version: 3.1.0
|
||||
|
||||
31
roles/geerlingguy.gitlab/molecule/default/version.yml
Normal file
31
roles/geerlingguy.gitlab/molecule/default/version.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
- name: Converge
|
||||
hosts: all
|
||||
become: true
|
||||
|
||||
vars:
|
||||
gitlab_restart_handler_failed_when: false
|
||||
|
||||
pre_tasks:
|
||||
- name: Update apt cache.
|
||||
apt: update_cache=true cache_valid_time=600
|
||||
when: ansible_os_family == 'Debian'
|
||||
changed_when: false
|
||||
|
||||
- name: Remove the .dockerenv file so GitLab Omnibus doesn't get confused.
|
||||
file:
|
||||
path: /.dockerenv
|
||||
state: absent
|
||||
|
||||
- name: Set the test GitLab version number for Debian.
|
||||
set_fact:
|
||||
gitlab_version: '11.4.0-ce.0'
|
||||
when: ansible_os_family == 'Debian'
|
||||
|
||||
- name: Set the test GitLab version number for RedHat.
|
||||
set_fact:
|
||||
gitlab_version: '11.4.0-ce.0.el7'
|
||||
when: ansible_os_family == 'RedHat'
|
||||
|
||||
roles:
|
||||
- role: geerlingguy.gitlab
|
||||
Reference in New Issue
Block a user