Skip to content

Commit 18b602e

Browse files
authored
Merge pull request #7 from Oefenweb/make-use-of-github
Make use of github actions
2 parents a6f67a6 + 7ff7bfd commit 18b602e

File tree

15 files changed

+182
-102
lines changed

15 files changed

+182
-102
lines changed

.ansible-lint

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
warn_list:
2+
- '106'

.github/workflows/ci.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
---
2+
name: CI
3+
'on':
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
schedule:
9+
- cron: '30 1 * * 3'
10+
11+
jobs:
12+
13+
lint:
14+
name: Lint
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Check out the codebase
18+
uses: actions/checkout@v2
19+
20+
- name: Set up Python 3
21+
uses: actions/setup-python@v2
22+
with:
23+
python-version: '3.x'
24+
25+
- name: Install test dependencies
26+
run: pip install ansible-lint[community,yamllint]
27+
28+
- name: Lint code
29+
run: |
30+
yamllint .
31+
ansible-lint
32+
33+
molecule:
34+
name: Molecule
35+
runs-on: ubuntu-latest
36+
defaults:
37+
run:
38+
working-directory: "${{ github.repository }}"
39+
needs:
40+
- lint
41+
strategy:
42+
fail-fast: false
43+
matrix:
44+
include:
45+
- distro: debian8
46+
ansible-version: '<2.10'
47+
- distro: debian9
48+
- distro: debian10
49+
- distro: ubuntu1604
50+
ansible-version: '>=2.8, <2.9'
51+
- distro: ubuntu1604
52+
ansible-version: '>=2.9, <2.10'
53+
- distro: ubuntu1604
54+
ansible-version: '>=2.10, <2.11'
55+
- distro: ubuntu1604
56+
- distro: ubuntu1804
57+
- distro: ubuntu2004
58+
59+
steps:
60+
- name: Check out the codebase
61+
uses: actions/checkout@v2
62+
with:
63+
path: "${{ github.repository }}"
64+
65+
- name: Set up Python 3
66+
uses: actions/setup-python@v2
67+
with:
68+
python-version: '3.x'
69+
70+
- name: Install test dependencies
71+
run: pip install 'ansible${{ matrix.ansible-version }}' molecule[docker] docker
72+
73+
- name: Run Molecule tests
74+
run: |
75+
molecule test
76+
env:
77+
ANSIBLE_FORCE_COLOR: '1'
78+
ANSIBLE_VERBOSITY: '3'
79+
MOLECULE_DEBUG: '1'
80+
MOLECULE_DISTRO: "${{ matrix.distro }}"
81+
PY_COLORS: '1'

.github/workflows/release.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Release
3+
'on':
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
10+
release:
11+
name: Release
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Check out the codebase
15+
uses: actions/checkout@v2
16+
17+
- name: Publish to Galaxy
18+
uses: robertdebock/[email protected]
19+
with:
20+
galaxy_api_key: ${{ secrets.GALAXY_API_KEY }}

.travis.yml

Lines changed: 0 additions & 81 deletions
This file was deleted.

.yamllint

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
extends: default
3+
4+
rules:
5+
braces:
6+
max-spaces-inside: 1
7+
level: error
8+
brackets:
9+
max-spaces-inside: 1
10+
level: error
11+
line-length: disable
12+
truthy: disable
13+
14+
ignore: |
15+
.tox/

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
## virtualbox
22

3-
[![Build Status](https://travis-ci.org/Oefenweb/ansible-virtualbox.svg?branch=master)](https://travis-ci.org/Oefenweb/ansible-virtualbox)
3+
[![CI](https://github.com/Oefenweb/ansible-virtualbox/workflows/CI/badge.svg)](https://github.com/Oefenweb/ansible-virtualbox/actions?query=workflow%3ACI)
44
[![Ansible Galaxy](http://img.shields.io/badge/ansible--galaxy-virtualbox-blue.svg)](https://galaxy.ansible.com/Oefenweb/virtualbox/)
55

66
Set up [VirtualBox](https://www.virtualbox.org/) in Debian-like systems.
77

88
#### Requirements
99

10-
None
10+
* `software-properties-common` (will be installed)
11+
* `dirmngr` (will be installed)
1112

1213
#### Variables
1314

Vagrantfile

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,26 @@
44
role = File.basename(File.expand_path(File.dirname(__FILE__)))
55

66
boxes = [
7-
{
8-
:name => "ubuntu-1404",
9-
:box => "bento/ubuntu-14.04",
10-
:ip => '10.0.0.12',
11-
:cpu => "50",
12-
:ram => "256"
13-
},
147
{
158
:name => "ubuntu-1604",
169
:box => "bento/ubuntu-16.04",
17-
:ip => '10.0.0.13',
10+
:ip => '10.0.0.12',
1811
:cpu => "50",
1912
:ram => "256"
2013
},
2114
{
2215
:name => "ubuntu-1804",
2316
:box => "bento/ubuntu-18.04",
24-
:ip => '10.0.0.14',
17+
:ip => '10.0.0.13',
2518
:cpu => "50",
2619
:ram => "384"
2720
},
2821
{
29-
:name => "debian-7",
30-
:box => "bento/debian-7",
31-
:ip => '10.0.0.15',
22+
:name => "ubuntu-2004",
23+
:box => "bento/ubuntu-20.04",
24+
:ip => '10.0.0.14',
3225
:cpu => "50",
33-
:ram => "256"
26+
:ram => "384"
3427
},
3528
{
3629
:name => "debian-8",

meta/main.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,11 @@ galaxy_info:
1111
platforms:
1212
- name: Ubuntu
1313
versions:
14-
- trusty
1514
- xenial
1615
- bionic
16+
- focal
1717
- name: Debian
1818
versions:
19-
- wheezy
2019
- jessie
2120
- stretch
2221
- buster

molecule/default/converge.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
- name: Converge
3+
hosts: all
4+
become: true
5+
tasks: []
6+
roles:
7+
- ../../../

molecule/default/molecule.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
dependency:
3+
name: galaxy
4+
driver:
5+
name: docker
6+
platforms:
7+
- name: instance
8+
image: "geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu1604}-ansible:latest"
9+
command: ${MOLECULE_DOCKER_COMMAND:-""}
10+
volumes:
11+
- /sys/fs/cgroup:/sys/fs/cgroup:ro
12+
privileged: true
13+
pre_build_image: true
14+
provisioner:
15+
name: ansible
16+
playbooks:
17+
prepare: prepare.yml
18+
converge: converge.yml
19+
verify: verify.yml

0 commit comments

Comments
 (0)