Skip to content

Commit

Permalink
update vars + molecule
Browse files Browse the repository at this point in the history
  • Loading branch information
Philippe LEAL committed Aug 20, 2021
1 parent a886f7d commit 44d2748
Show file tree
Hide file tree
Showing 14 changed files with 448 additions and 294 deletions.
1 change: 1 addition & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
skip_list:
- '106'
- '401'
173 changes: 101 additions & 72 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -1,83 +1,112 @@
---
# https://yamllint.readthedocs.io/en/stable/rules.html
extends: default
yaml-files:
- '*.yaml'
- '*.yml'
- '.yamllint'

rules:
braces:
# Keeping 0 min-spaces to not error on empty collection definitions
min-spaces-inside: 0
# Allowing one space inside braces to improve code readability
max-spaces-inside: 1

brackets:
# Keeping 0 min-spaces to not error on empty collection definitions
min-spaces-inside: 0
# Allowing one space inside braces to improve code readability
max-spaces-inside: 1

colons:
braces: enable
brackets: enable
colons: enable
commas: enable
comments: disable
comments-indentation:
level: warning
max-spaces-before: 0
# Allow to tab all vars on the same column
max-spaces-after: -1

commas:
max-spaces-before: 0
min-spaces-after: 1
max-spaces-after: 1

comments:
# Disabling to allow for code comment blocks and #!/usr/bin/ansible-playbook
require-starting-space: false
ignore-shebangs: true
min-spaces-from-content: 2

comments-indentation: enable

document-end: disable
document-start:
present: true

empty-lines:
max: 2
max-start: 0
max-end: 0

empty-values:
forbid-in-block-mappings: true
forbid-in-flow-mappings: true

hyphens:
max-spaces-after: 1

indentation:
# Requiring 2 space indentation
spaces: 2
# Requiring consistent indentation within a file, either indented or not
indent-sequences: consistent
check-multi-line-strings: false

level: warning
empty-lines: enable
empty-values: disable
hyphens: enable
indentation: enable
key-duplicates: enable

# Disabling due to copious amounts of long lines in the code which would
key-ordering: disable
line-length: disable

new-line-at-end-of-file: enable

new-lines:
type: unix

octal-values:
forbid-implicit-octal: false
forbid-explicit-octal: true

quoted-strings:
new-lines: enable
octal-values: disable
quoted-strings: disable
trailing-spaces: enable
truthy:
level: warning
quote-type: any
required: false
extra-required: []
extra-allowed: []

trailing-spaces: enable

# Disabling due to copious amounts of truthy warnings in the code which would
truthy: disable
#rules:
# braces:
# # Keeping 0 min-spaces to not error on empty collection definitions
# min-spaces-inside: 0
# # Allowing one space inside braces to improve code readability
# max-spaces-inside: 1
#
# brackets:
# # Keeping 0 min-spaces to not error on empty collection definitions
# min-spaces-inside: 0
# # Allowing one space inside braces to improve code readability
# max-spaces-inside: 1
#
# colons:
# level: warning
# max-spaces-before: 0
# # Allow to tab all vars on the same column
# max-spaces-after: -1
#
# commas:
# max-spaces-before: 0
# min-spaces-after: 1
# max-spaces-after: 1
#
# comments:
# # Disabling to allow for code comment blocks and #!/usr/bin/ansible-playbook
# require-starting-space: false
# ignore-shebangs: true
# min-spaces-from-content: 2
#
# comments-indentation: enable
#
# document-start:
# present: true
#
# empty-lines:
# max: 2
# max-start: 0
# max-end: 0
#
# empty-values:
# forbid-in-block-mappings: true
# forbid-in-flow-mappings: true
#
# hyphens:
# max-spaces-after: 1
#
# indentation:
# # Requiring 2 space indentation
# spaces: 2
# # Requiring consistent indentation within a file, either indented or not
# indent-sequences: consistent
# check-multi-line-strings: false
#
# key-duplicates: enable
#
# # Disabling due to copious amounts of long lines in the code which would
# line-length: disable
#
# new-line-at-end-of-file: enable
#
# new-lines:
# type: unix
#
# octal-values:
# forbid-implicit-octal: false
# forbid-explicit-octal: true
#
# quoted-strings:
# level: warning
# quote-type: any
# required: false
# extra-required: []
# extra-allowed: []
#
# trailing-spaces: enable
#
# # Disabling due to copious amounts of truthy warnings in the code which would
# truthy: disable
6 changes: 3 additions & 3 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# Install
fluentbit_version: "1.5.6"
fluentbit_version: "1.8.3"
fluentbit_binary_name: '/usr/local/bin/fluent-bit'
fluentbit_nofile_limit: '262144'
fluentbit_install_dir: '/etc/fluent-bit'
Expand All @@ -24,7 +24,7 @@ fluentbit_inputs:
db: /var/log/syslog.db
parser: syslog
## optional
#buffer_chunk_size: 512K
#buffer_chunk_size: 512K
#buffer_max_size: 1M
#refresh_interval: 60
#ignore_older: 1h #help to not crash on start with too many open file
Expand All @@ -47,4 +47,4 @@ fluentbit_parsers:
regex: '^(?<register_time>[^ ]*) (?<source>[^ ]*) (?<level>[^ ]*) *(?<message>.*)$'
time_key: time
time_format: '%Y-%m-%dT%H:%M:%S %z'
time_keep: on
time_keep: "on"
6 changes: 4 additions & 2 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ galaxy_info:
platforms:
- name: "Ubuntu"
versions:
- "all"
- "focal"
- "bionic"
- name: "Debian"
versions:
- "all"
- "buster"
- "stretch"

galaxy_tags:
- fluentbit
Expand Down
43 changes: 0 additions & 43 deletions molecule/default/converge.yml

This file was deleted.

98 changes: 72 additions & 26 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,88 @@
---
dependency:
name: galaxy
options:
role-file: requirements.yml

driver:
name: docker

lint: |
yamllint .
platforms:
- name: test-01.dvlp.example.com
image: "geerlingguy/docker-${MOLECULE_DISTRO:-debian10}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
- name: bionic
pre_build_image: true
image: quay.io/paulfantom/molecule-systemd:ubuntu-18.04
docker_host: "${DOCKER_HOST:-unix://var/run/docker.sock}"
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- name: xenial
pre_build_image: true
image: quay.io/paulfantom/molecule-systemd:ubuntu-16.04
docker_host: "${DOCKER_HOST:-unix://var/run/docker.sock}"
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- name: stretch
pre_build_image: true

image: quay.io/paulfantom/molecule-systemd:debian-9
docker_host: "${DOCKER_HOST:-unix://var/run/docker.sock}"
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- name: buster
pre_build_image: true
image: quay.io/paulfantom/molecule-systemd:debian-10
docker_host: "${DOCKER_HOST:-unix://var/run/docker.sock}"
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- name: bullseye
pre_build_image: true
image: geerlingguy/docker-debian11-ansible #cant start service
docker_host: "${DOCKER_HOST:-unix://var/run/docker.sock}"
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- name: centos7
pre_build_image: true
image: quay.io/paulfantom/molecule-systemd:centos-7
docker_host: "${DOCKER_HOST:-unix://var/run/docker.sock}"
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- name: centos8
pre_build_image: true
image: quay.io/paulfantom/molecule-systemd:centos-8
docker_host: "${DOCKER_HOST:-unix://var/run/docker.sock}"
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
groups:
- python3
- name: rocky8
pre_build_image: true
image: geerlingguy/docker-rockylinux8-ansible:latest
docker_host: "${DOCKER_HOST:-unix://var/run/docker.sock}"
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- name: fedora
pre_build_image: true
image: quay.io/paulfantom/molecule-systemd:fedora-30
docker_host: "${DOCKER_HOST:-unix://var/run/docker.sock}"
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
groups:
- python3
provisioner:
name: ansible
playbooks:
converge: ${MOLECULE_PLAYBOOK:-converge.yml}
lint: |
ansible-lint
scenario:
name: default
test_sequence:
- destroy
- dependency
- lint
- syntax
- create
- converge
# - verify
- destroy
prepare: prepare.yml
converge: playbook.yml
inventory:
group_vars:
python3:
ansible_python_interpreter: /usr/bin/python3
host_vars:
bullseye:
ansible_python_interpreter: "/usr/bin/python3.9"

verifier:
name: goss
7 changes: 7 additions & 0 deletions molecule/default/playbook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
- name: Run role
hosts: all
become: true

roles:
- role: apps_fluentbit
Loading

0 comments on commit 44d2748

Please sign in to comment.