From ac2451fc56bf4df4433feb827fafd6286722e1d8 Mon Sep 17 00:00:00 2001 From: Larry Smith Jr Date: Sun, 4 Jun 2023 11:36:08 -0400 Subject: [PATCH] Added pre-commit and Ansible roles/collection requirements --- .gitignore | 28 ++++++++++++++++++++++++++++ .pre-commit-config.yaml | 32 ++++++++++++++++++++++++++++++++ meta/main.yml | 4 +++- requirements.yml | 5 +++++ 4 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 .pre-commit-config.yaml create mode 100644 requirements.yml diff --git a/.gitignore b/.gitignore index f7275bb..d8813fa 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,29 @@ +!* + +### Ansible +.cache/ + +### VirtualEnv ### +# Virtualenv +.venv/ 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 + +.vscode/ + +.DS_Store diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..3cc412a --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,32 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: check-added-large-files + - id: check-executables-have-shebangs + - id: check-merge-conflict + - id: check-symlinks + - id: detect-private-key + - id: end-of-file-fixer + - id: no-commit-to-branch + args: [--branch, develop, --branch, master, --branch, main] + - id: trailing-whitespace + - repo: https://github.com/ansible-community/ansible-lint + rev: v6.17.0 + hooks: + - id: ansible-lint + - repo: https://github.com/psf/black + rev: 23.3.0 + hooks: + - id: black + language_version: python3 + - repo: https://github.com/PyCQA/flake8 + rev: 6.0.0 + hooks: + - id: flake8 + - repo: https://github.com/adrienverge/yamllint + rev: v1.32.0 + hooks: + - id: yamllint diff --git a/meta/main.yml b/meta/main.yml index 831a265..0f78e05 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -3,8 +3,10 @@ galaxy_info: author: Larry Smith Jr. description: Ansible role to install/configure Netdata license: MIT + namespace: mrlesmithjr + role_name: netdata - min_ansible_version: 2.0 + min_ansible_version: "2.0" platforms: - name: EL diff --git a/requirements.yml b/requirements.yml new file mode 100644 index 0000000..3a35fcc --- /dev/null +++ b/requirements.yml @@ -0,0 +1,5 @@ +--- +collections: + - name: community.docker + version: "*" # Need to ensure that the latest version is installed or Molecule fails +roles: []