Skip to content

Commit aaf29d6

Browse files
fix: github ci/cd build (#11)
1 parent d8905ca commit aaf29d6

34 files changed

+136
-496
lines changed

.ansible-lint

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
exclude_paths:
3+
- molecule/
4+
- .github/
5+
- ansible/
6+
- requirements.yml
7+
parseable: true
8+
quiet: false
9+
verbosity: 1
10+
11+
use_default_rules: true

.cookiecutter.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
default_context:
3+
role_name: minio

.github/workflows/ansible.yml

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
name: Ansible package
1+
---
2+
name: CI
23

34
on:
45
pull_request:
@@ -9,26 +10,30 @@ on:
910
- master
1011

1112
jobs:
12-
build:
13-
name: Test on python ${{ matrix.python-version }} and ${{ matrix.os }}
14-
runs-on: ${{ matrix.os }}
15-
strategy:
16-
max-parallel: 3
17-
matrix:
18-
python-version: [3.8]
19-
os: [ubuntu-latest]
13+
lint:
14+
runs-on: ubuntu-latest
15+
container: ghcr.io/pavelpikta/docker-ansible-ci:2.9
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v2
19+
with:
20+
fetch-depth: 0
21+
- name: Lints
22+
run: |
23+
yamllint . -c .yamllint
24+
ansible-lint -c .ansible-lint
25+
molecule:
26+
needs: lint
27+
runs-on: ubuntu-latest
28+
container: ghcr.io/pavelpikta/docker-ansible-ci:2.9
2029

2130
steps:
22-
- uses: actions/checkout@v2
23-
- name: Set up Python ${{ matrix.python-version }}
24-
uses: actions/setup-python@v1
25-
with:
26-
python-version: ${{ matrix.python-version }}
27-
- name: Install dependencies
28-
env:
29-
MOLECULE_DEBUG: 1
30-
run: |
31-
sudo apt install python-is-python3 --yes
32-
python -m pip install --upgrade pip setuptools
33-
python -m pip install tox ansible
34-
tox
31+
- name: Checkout repository
32+
uses: actions/checkout@v2
33+
34+
- name: Molecule
35+
run: |
36+
pip3 install ansible ansible-lint
37+
pip3 install molecule[lint,docker]==3.2.3
38+
39+
molecule test -s default

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,4 @@ tests/__pycache__/
77
*.pyc
88

99
*.retry
10-
.tox
1110
*.log

.yamllint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
extends: default
33

44
ignore: |
5-
.tox/
5+
ansible/
66
meta/
77
.github/
88

MAINTAINERS.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
Maintainers of this repository:
22

33
* Harshavardhana <[email protected]> @harshavardhana
4-
* Andrea Tosatto <[email protected]> @atosatto
5-
* Pawel Krupa <[email protected]> @paulfantom
6-
* Ben Kochie <[email protected]> @SuperQ

defaults/main.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
minio_server_bin: /usr/local/bin/minio
55
minio_client_bin: /usr/local/bin/mc
66

7+
minio_hostname: "{{ ansible_fqdn }}"
8+
79
# MinIO release to install.
810
minio_server_release: "RELEASE.2021-11-24T23-19-33Z"
911

@@ -56,3 +58,6 @@ minio_root_password: "{{ minio_secret_key | default('minioadmin') }}"
5658
# Switches to enable/disable the MinIO server and/or MinIO client installation.
5759
minio_install_server: true
5860
minio_install_client: true
61+
62+
# TODO: in future
63+
minio_enable_ssl: false

handlers/main.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
# handlers file for minio
23

34
- name: reload minio systemd
45
systemd:
@@ -9,3 +10,17 @@
910
service:
1011
name: minio
1112
state: restarted
13+
notify: Check Minio on '{{ minio_connection_type }}'
14+
become: true
15+
16+
- name: Check Minio on '{{ minio_connection_type }}'
17+
uri:
18+
url: "{{ minio_connection_type }}://{{ minio_hostname }}:{{ minio_server_port }}/minio/login"
19+
status_code: 200
20+
headers:
21+
User-Agent: "Mozilla/5.0"
22+
validate_certs: false
23+
register: login_page
24+
until: login_page.status == 200
25+
retries: 10
26+
delay: 1

meta/main.yml

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,22 @@
11
galaxy_info:
2+
role_name: minio
3+
autho: MinIO Development
24
author: Andrea Tosatto
3-
role_name: myname
4-
namespace: mynamespace
55
description: Install and configure the MinIO S3 compatible object storage server on RHEL/CentOS and Debian/Ubuntu
6-
min_ansible_version: 2.9
76
license: MIT
8-
issue_tracker_url: https://github.com/minio/ansible-minio/issues
9-
7+
min_ansible_version: 2.9
108
platforms:
11-
- name: EL
12-
versions:
13-
- 7
14-
- name: Fedora
9+
- name: "Ubuntu"
1510
versions:
16-
- 27
17-
- name: Ubuntu
11+
- "xenial"
12+
- "bionic"
13+
- name: "Debian"
1814
versions:
19-
- trusty
20-
- utopic
21-
- vivid
22-
- wily
23-
- xenial
24-
- name: Debian
15+
- "stretch"
16+
- name: "EL"
2517
versions:
26-
- etch
27-
- jessie
18+
- "7"
19+
issue_tracker_url: https://github.com/minio/ansible-minio/issues
2820

2921
galaxy_tags:
3022
- system

molecule/alternative/converge.yml

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

0 commit comments

Comments
 (0)