Skip to content

Commit

Permalink
Merge pull request #53 from mrlesmithjr/fix-linting-issues
Browse files Browse the repository at this point in the history
Fix linting issues
  • Loading branch information
mrlesmithjr authored Dec 23, 2023
2 parents 2a69ce7 + 61cbe22 commit 836fdb7
Show file tree
Hide file tree
Showing 45 changed files with 2,140 additions and 260 deletions.
2 changes: 2 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
skip_list:
- name[casing]
30 changes: 23 additions & 7 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
---
name: Molecule Test
on: push
on:
push:
branches-ignore:
- main
- master
pull_request:
branches:
- develop
- main
- master
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -9,22 +18,29 @@ jobs:
max-parallel: 4
matrix:
molecule_distro:
# - alpine313
# - alpine314
# - centos7
- centos8
# - centos8
# - debian8
- debian9
- debian10
# - debian9
# - debian10
# - debian11
# - fedora
# - fedora34
# - fedora35
# - rocky8
# - ubuntu1604
- ubuntu1804
- ubuntu2004

# - ubuntu2204
python-version: [3.9]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v2
Expand Down
26 changes: 24 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
venv/
!*

### Ansible
.cache/

### VirtualEnv ###
# Virtualenv
.venv/
poetry.lock
venv/

### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace

# Local History for Visual Studio Code
.history/

### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: check-executables-have-shebangs
Expand All @@ -14,19 +14,19 @@ repos:
args: [--branch, develop, --branch, master, --branch, main]
- id: trailing-whitespace
- repo: https://github.com/ansible-community/ansible-lint
rev: v5.0.7
rev: v6.22.1
hooks:
- id: ansible-lint
- repo: https://github.com/psf/black
rev: 20.8b1
rev: 23.3.0
hooks:
- id: black
language_version: python3
- repo: https://github.com/PyCQA/flake8
rev: 3.9.1
rev: 6.1.0
hooks:
- id: flake8
- repo: https://github.com/adrienverge/yamllint
rev: v1.26.1
rev: v1.33.0
hooks:
- id: yamllint
16 changes: 8 additions & 8 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@ rabbitmq_env_config: {}

# rabbitmq_debian_repo: deb http://www.rabbitmq.com/debian/ testing main
#other repos
rabbitmq_debian_repo: "deb https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server/deb/debian {{ ansible_distribution_release }} main"
rabbitmq_debian_repo_key: "https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server/gpg.9F4587F226208342.key"
rabbitmq_debian_repo: "deb https://ppa1.novemberain.com/rabbitmq/rabbitmq-server/deb/ubuntu {{ ansible_distribution_release }} main"
rabbitmq_debian_repo_key: "https://github.com/rabbitmq/signing-keys/releases/download/3.0/cloudsmith.rabbitmq-server.9F4587F226208342.key"
rabbitmq_debian_team_key: "0x0A9AF2115F4687BD29803A206B73A36E6026DFCA"

rabbitmq_debian_erlang_from_rabbit: true
rabbitmq_debian_erlang_repo: "deb https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/deb/debian {{ ansible_distribution_release }} main"
rabbitmq_debian_erlang_repo_key: "https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/gpg.E495BB49CC4BBE5B.key"
rabbitmq_debian_erlang_repo: "deb https://ppa1.novemberain.com/rabbitmq/rabbitmq-erlang/deb/ubuntu {{ ansible_distribution_release }} main"
rabbitmq_debian_erlang_repo_key: "https://github.com/rabbitmq/signing-keys/releases/download/3.0/cloudsmith.rabbitmq-erlang.E495BB49CC4BBE5B.key"


# current version if not defined
rabbitmq_debian_version_defined: true
rabbitmq_debian_version: 3.8.18-1
rabbitmq_debian_version: 3.12.10-1

# Defines if setting up a rabbitmq cluster
rabbitmq_enable_clustering: false
Expand Down Expand Up @@ -69,10 +69,10 @@ rabitmq_ssl_options: {}
# verify: verify_peer
# fail_if_no_peer_cert: "false"

rabbitmq_redhat_repo_key: https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc
rabbitmq_redhat_repo_key: https://github.com/rabbitmq/signing-keys/releases/download/3.0/rabbitmq-release-signing-key.asc
rabbitmq_redhat_package: "rabbitmq-server-{{ rabbitmq_redhat_version }}-1.el{{ ansible_distribution_major_version }}.noarch.rpm"
rabbitmq_redhat_url: "https://dl.bintray.com/rabbitmq/rpm/rabbitmq-server/v3.8.x/el/{{ ansible_distribution_major_version }}/noarch"
rabbitmq_redhat_version: 3.8.11
rabbitmq_redhat_url: "https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server/rpm/el/{{ ansible_distribution_major_version }}/noarch"
rabbitmq_redhat_version: 3.12.10

# Define extra vhosts to be created
rabbitmq_extra_vhosts: []
Expand Down
2 changes: 1 addition & 1 deletion handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# handlers file for ansible-rabbitmq
- name: restart rabbitmq-server
service:
ansible.builtin.service:
name: rabbitmq-server
state: restarted
become: true
21 changes: 5 additions & 16 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,22 @@ galaxy_info:
author: Larry Smith Jr.
description: Ansible role to install/configure RabbitMQ
license: MIT
min_ansible_version: 1.2
min_ansible_version: "1.2"
role_name: rabbitmq
namespace: mrlesmithjr
platforms:
- name: EL
versions:
- 8
- all
- name: Fedora
versions:
# - 22
# - 23
- 24
- 25
- 26
- 27
- 28
- 29
- all
- name: Ubuntu
versions:
- focal
- bionic
# - trusty
# - xenial
- all
- name: Debian
versions:
- buster
- stretch
- all
galaxy_tags:
- clustering
- system
Expand Down
14 changes: 9 additions & 5 deletions molecule/centos7/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,21 @@ lint: |
flake8
platforms:
- name: centos7
image: jrei/systemd-centos:7
image: mrlesmithjr/centos:7
privileged: true
command: /usr/sbin/init
tmpfs:
- /run
- /tmp
# tmpfs:
# - /run
# - /tmp
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /sys/fs/cgroup:/sys/fs/cgroup:rw
cgroupns_mode: host
# groups: []
provisioner:
name: ansible
playbooks:
converge: ../shared/converge.yml
prepare: ../shared/prepare.yml
verify: ../shared/verify.yml
verifier:
name: ansible
2 changes: 1 addition & 1 deletion molecule/centos7/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
hosts: all
tasks:
- name: Example assertion
assert:
ansible.builtin.assert:
that: true
14 changes: 9 additions & 5 deletions molecule/centos8/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,21 @@ lint: |
flake8
platforms:
- name: centos8
image: jrei/systemd-centos:8
image: mrlesmithjr/centos:8
privileged: true
command: /usr/sbin/init
tmpfs:
- /run
- /tmp
# tmpfs:
# - /run
# - /tmp
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /sys/fs/cgroup:/sys/fs/cgroup:rw
cgroupns_mode: host
# groups: []
provisioner:
name: ansible
playbooks:
converge: ../shared/converge.yml
prepare: ../shared/prepare.yml
verify: ../shared/verify.yml
verifier:
name: ansible
2 changes: 1 addition & 1 deletion molecule/centos8/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
hosts: all
tasks:
- name: Example assertion
assert:
ansible.builtin.assert:
that: true
14 changes: 9 additions & 5 deletions molecule/debian10/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,21 @@ lint: |
flake8
platforms:
- name: debian10
image: jrei/systemd-debian:10
image: mrlesmithjr/debian:10
privileged: true
command: /lib/systemd/systemd
tmpfs:
- /run
- /tmp
# tmpfs:
# - /run
# - /tmp
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /sys/fs/cgroup:/sys/fs/cgroup:rw
cgroupns_mode: host
# groups: []
provisioner:
name: ansible
playbooks:
converge: ../shared/converge.yml
prepare: ../shared/prepare.yml
verify: ../shared/verify.yml
verifier:
name: ansible
2 changes: 1 addition & 1 deletion molecule/debian10/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
hosts: all
tasks:
- name: Example assertion
assert:
ansible.builtin.assert:
that: true
14 changes: 9 additions & 5 deletions molecule/debian8/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,21 @@ lint: |
flake8
platforms:
- name: debian8
image: jrei/systemd-debian:8
image: mrlesmithjr/debian:8
privileged: true
command: /lib/systemd/systemd
tmpfs:
- /run
- /tmp
# tmpfs:
# - /run
# - /tmp
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /sys/fs/cgroup:/sys/fs/cgroup:rw
cgroupns_mode: host
# groups: []
provisioner:
name: ansible
playbooks:
converge: ../shared/converge.yml
prepare: ../shared/prepare.yml
verify: ../shared/verify.yml
verifier:
name: ansible
2 changes: 1 addition & 1 deletion molecule/debian8/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
hosts: all
tasks:
- name: Example assertion
assert:
ansible.builtin.assert:
that: true
14 changes: 9 additions & 5 deletions molecule/debian9/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,21 @@ lint: |
flake8
platforms:
- name: debian9
image: jrei/systemd-debian:9
image: mrlesmithjr/debian:9
privileged: true
command: /lib/systemd/systemd
tmpfs:
- /run
- /tmp
# tmpfs:
# - /run
# - /tmp
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /sys/fs/cgroup:/sys/fs/cgroup:rw
cgroupns_mode: host
# groups: []
provisioner:
name: ansible
playbooks:
converge: ../shared/converge.yml
prepare: ../shared/prepare.yml
verify: ../shared/verify.yml
verifier:
name: ansible
2 changes: 1 addition & 1 deletion molecule/debian9/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
hosts: all
tasks:
- name: Example assertion
assert:
ansible.builtin.assert:
that: true
2 changes: 1 addition & 1 deletion molecule/fedora/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
hosts: all
tasks:
- name: Example assertion
assert:
ansible.builtin.assert:
that: true
2 changes: 1 addition & 1 deletion molecule/shared/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
hosts: all
tasks:
- name: Include ansible-rabbitmq
include_role:
ansible.builtin.include_role:
name: ansible-rabbitmq
9 changes: 9 additions & 0 deletions molecule/shared/prepare.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
- name: Prepare hosts for testing
hosts: all
tasks:
- name: Update Apt Cache
ansible.builtin.apt:
update_cache: true
become: true
when: ansible_os_family == "Debian"
Loading

0 comments on commit 836fdb7

Please sign in to comment.