Skip to content

Commit

Permalink
Update role
Browse files Browse the repository at this point in the history
  • Loading branch information
buluma committed Jul 13, 2024
1 parent 1f83acb commit 1088c7c
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 46 deletions.
1 change: 0 additions & 1 deletion .ansible-lint
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# Ansible managed
#
exclude_paths:
- meta/preferences.yml
- molecule/default/prepare.yml
- molecule/default/converge.yml
- molecule/default/verify.yml
Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ on:
- main
- testing
- dependabot/**
# - renovate/**
paths-ignore:
- '**/README.md'
- '**/CHANGELOG.md'
Expand All @@ -21,8 +20,7 @@ on:
pull_request:
pull_request_target:
schedule:
# - cron: '7 4 4 * *'
- cron: '7 4 * * *'
- cron: '7 4 4/4 * *'

workflow_dispatch:

Expand All @@ -36,10 +34,10 @@ jobs:
lint:
runs-on: ubuntu-20.04
steps:
- name: checkout
- name: Checkout Role
uses: actions/checkout@v4
- name: ansible-lint
uses: ansible-community/ansible-lint-action@main
- name: Run Ansible-lint
uses: ansible/ansible-lint@v24.7.0
test:
needs:
- lint
Expand All @@ -50,20 +48,24 @@ jobs:
config:
- image: "docker-molecule-images"
tag: "bullseye"
- image: "enterpriselinux"
tag: "8"
- image: "enterpriselinux"
tag: "latest"
- image: "docker-molecule-images"
tag: "fedora39"
- image: "docker-molecule-images"
tag: "fedora38"
- image: "docker-molecule-images"
tag: "fedora40"
- image: "docker-molecule-images"
tag: "jammy"
- image: "docker-molecule-images"
tag: "focal"
- image: "docker-molecule-images"
tag: "bionic"
- image: "docker-molecule-images"
tag: "noble"
- image: "docker-molecule-images"
tag: "lunar"
steps:
- name: Checkout Role
uses: actions/checkout@v4
Expand Down
36 changes: 23 additions & 13 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
---
extends: default

# https://ansible.readthedocs.io/projects/lint/rules/yaml/#octals
rules:
comments:
# https://github.com/prettier/prettier/issues/6780
min-spaces-from-content: 1
# https://github.com/adrienverge/yamllint/issues/384
comments-indentation: false
document-start: disable
# 160 chars was the default used by old E204 rule, but
# you can easily change it or disable in your .yamllint file.
line-length:
max: 200
# We are adding an extra space inside braces as that's how prettier does it
# and we are trying not to fight other linters.
braces:
max-spaces-inside: 1
level: error
brackets:
max-spaces-inside: 1
level: error
line-length: disable
truthy:
check-keys: false

ignore: |
.tox/
.cache/
min-spaces-inside: 0 # yamllint defaults to 0
max-spaces-inside: 1 # yamllint defaults to 0
# key-duplicates:
# forbid-duplicated-merge-keys: true # not enabled by default
octal-values:
forbid-implicit-octal: true # yamllint defaults to false
forbid-explicit-octal: true # yamllint defaults to false
# quoted-strings:
# quote-type: double
# required: only-when-needed
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ This role has been tested on these [container images](https://hub.docker.com/u/b
|container|tags|
|---------|----|
|[Debian](https://hub.docker.com/r/buluma/debian)|bullseye|
|[EL](https://hub.docker.com/r/buluma/enterpriselinux)|8, 9|
|[Fedora](https://hub.docker.com/r/buluma/fedora)|39, 38|
|[Ubuntu](https://hub.docker.com/r/buluma/ubuntu)|jammy, focal, bionic|
|[EL](https://hub.docker.com/r/buluma/enterpriselinux)|9|
|[Fedora](https://hub.docker.com/r/buluma/fedora)|39, 38, 40|
|[Ubuntu](https://hub.docker.com/r/buluma/ubuntu)|jammy, focal, bionic, noble, lunar|

The minimum version of Ansible required is 2.12, tests have been done to:

Expand Down
2 changes: 1 addition & 1 deletion handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

- name: Apt update cache
ansible.builtin.apt:
update_cache: yes
update_cache: true
14 changes: 0 additions & 14 deletions meta/exception.yml

This file was deleted.

4 changes: 3 additions & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,19 @@ galaxy_info:
- bullseye
- name: EL
versions:
- "8"
- "9"
- name: Fedora
versions:
- "39"
- "38"
- "40"
- name: Ubuntu
versions:
- jammy
- focal
- bionic
- noble
- lunar

galaxy_tags:
- dockerce
Expand Down
2 changes: 0 additions & 2 deletions meta/preferences.yml

This file was deleted.

2 changes: 1 addition & 1 deletion tasks/assert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
ansible.builtin.assert:
that:
- docker_ce_privileged_users is iterable
quiet: yes
quiet: true
when:
- docker_ce_privileged_users is defined
4 changes: 2 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
ansible.builtin.user:
name: "{{ user }}"
groups: docker
append: yes
append: true
loop: "{{ docker_ce_privileged_users }}"
loop_control:
loop_var: user
Expand All @@ -55,6 +55,6 @@
ansible.builtin.service:
name: "{{ docker_ce_service }}"
state: started
enabled: yes
enabled: true
when:
- ansible_connection not in [ "container", "docker", "community.docker.docker" ]
1 change: 1 addition & 0 deletions vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ _docker_ce_dist:
default: "{{ ansible_distribution | lower }}"
Rocky: centos
RedHat: rhel
OracleLinux: centos

docker_ce_dist: "{{ _docker_ce_dist[ansible_distribution] | default(_docker_ce_dist['default']) }}"

Expand Down

0 comments on commit 1088c7c

Please sign in to comment.