Skip to content

Commit

Permalink
Adjust inventory location
Browse files Browse the repository at this point in the history
Closes #4
  • Loading branch information
edwardtheharris committed Jul 23, 2024
1 parent c41bb59 commit 847d78c
Show file tree
Hide file tree
Showing 34 changed files with 1,519 additions and 1,536 deletions.
205 changes: 131 additions & 74 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -1,49 +1,122 @@
---
# .ansible-lint

profile: null # min, basic, moderate,safety, shared, production

###
# ```{rubric} .ansible-lint
# ```
# ---
# Allows dumping of results in SARIF format
# sarif_file: result.sarif

# exclude_paths included in this file are parsed relative to this file's location
# and not relative to the CWD of execution. CLI arguments passed to the --exclude
#
# Ansible-lint does not automatically load rules that have the 'opt-in' tag.
# You must enable opt-in rules by listing each rule 'id' below.
#
# add yaml here if you want to avoid ignoring yaml checks when yamllint
# library is missing. Normally its absence just skips using that rule.
#
# ```{literalinclude} /.ansible-lint
# :language: yaml
# :start-at: "enable_list:\n"
# :end-before: "###\n"
# ```
enable_list:
- args
- empty-string-compare # opt-in
- no-log-password # opt-in
- no-same-owner # opt-in
- name[prefix] # opt-in
- yaml
###
# ```{rubric} Exclude Paths
# ```
# ---
# Report only a subset of tags and fully ignore any others
# tags:
# - jinja[spacing]
#
# `exclude_paths` included in this file are parsed relative to this file's
# location
# and not relative to the CWD of execution. CLI arguments passed to the
# `--exclude`
# option are parsed relative to the CWD of execution.
#
# ```{literalinclude} /.ansible-lint
# :start-at: "exclude_paths:\n"
# :end-before: "###\n"
# ```
exclude_paths:
- .cache/ # implicit unless exclude_paths is defined in config
- test/fixtures/formatting-before/
- test/fixtures/formatting-prettier/
- .github/
- _static/
- .markdownlint-cli2.yaml
- .markdownlint.yaml
###
# ```{rubric} Kinds
# ```
# ---
# parseable: true
# quiet: true
# strict: true
# verbosity: 1

# List of additional kind:pattern to be added at the top of the default
# match list, first match determines the file kind.
#
# ```{literalinclude} /.ansible-lint
# :start-at: "kinds:\n"
# :end-before: "###\n"
# ```
kinds:
# - playbook: "**/examples/*.{yml,yaml}"
# - galaxy: "**/folder/galaxy.yml"
# - tasks: "**/tasks/*.yml"
# - vars: "**/vars/*.yml"
# - meta: "**/meta/main.yml"
- playbook: "site.yaml"
###
# Enable checking of loop variable prefixes in roles
loop_var_prefix: "^(__|{role}_)"
###
# ```{rubric} Mocks
# ```
# ---
# Mock modules or roles in order to pass ansible-playbook --syntax-check
#
# note the foo.bar is invalid as being neither a module or a collection
#
# ```{literalinclude} /.ansible-lint
# :start-at: "mock_modules:\n"
# :end-before: "###\n"
# ```
mock_modules:
- zuul_return
# note the foo.bar is invalid as being neither a module or a collection
- fake_namespace.fake_collection.fake_module
- fake_namespace.fake_collection.fake_module.fake_submodule
###
# role within a collection
# old standalone galaxy role
#
# ```{literalinclude} /.ansible-lint
# :start-at: "mock_roles:\n"
# :end-before: "###\n"
# ```
mock_roles:
- mocked_role
- author.role_name # old standalone galaxy role
- fake_namespace.fake_collection.fake_role # role within a collection

# Enable checking of loop variable prefixes in roles
loop_var_prefix: "^(__|{role}_)"

# Enforce variable names to follow pattern below, in addition to Ansible own
# requirements, like avoiding python identifiers. To disable add `var-naming`
# to skip_list.
var_naming_pattern: "^[a-z_][a-z0-9_]*$"

use_default_rules: true
# Load custom rules from this specific folder
# rulesdir:
# - ./rule/directory/

- author.role_name
- fake_namespace.fake_collection.fake_role
###
# Some rules can transform files to fix (or make it easier to fix) identified
# errors. `ansible-lint --fix` will reformat YAML files and run these transforms.
# By default it will run all transforms (effectively `write_list: ["all"]`).
# You can disable running transforms by setting `write_list: ["none"]`.
# Or only enable a subset of rule transforms by listing rules/tags here.
# write_list:
# - all
# Offline mode disables installation of requirements.yml and schema refreshing
offline: true
###
# min, basic, moderate,safety, shared, production
profile: null
###
# Ansible-lint is able to recognize and load skip rules stored inside
# `.ansible-lint-ignore` (or `.config/ansible-lint-ignore.txt`) files.
# To skip a rule just enter filename and tag, like "playbook.yml package-latest"
Expand All @@ -52,75 +125,59 @@ use_default_rules: true
# the use of skip_list below because that will hide violations from the output.
# When putting ignores inside the ignore file, they are marked as ignored, but
# still visible, making it easier to address later.
#
# ```{literalinclude} /.ansible-lint
# :start-at: "skip_list:\n"
# :end-before: "###\n"
# ```
skip_list:
- skip_this_tag

# Ansible-lint does not automatically load rules that have the 'opt-in' tag.
# You must enable opt-in rules by listing each rule 'id' below.
enable_list:
- args
- empty-string-compare # opt-in
- no-log-password # opt-in
- no-same-owner # opt-in
- name[prefix] # opt-in
# add yaml here if you want to avoid ignoring yaml checks when yamllint
# library is missing. Normally its absence just skips using that rule.
- yaml
# Report only a subset of tags and fully ignore any others
# tags:
# - jinja[spacing]

# Ansible-lint does not fail on warnings from the rules or tags listed below
warn_list:
- skip_this_tag
- experimental # experimental is included in the implicit list
# - role-name
# - yaml[document-start] # you can also use sub-rule matches

# Some rules can transform files to fix (or make it easier to fix) identified
# errors. `ansible-lint --fix` will reformat YAML files and run these transforms.
# By default it will run all transforms (effectively `write_list: ["all"]`).
# You can disable running transforms by setting `write_list: ["none"]`.
# Or only enable a subset of rule transforms by listing rules/tags here.
# write_list:
# - all

# Offline mode disables installation of requirements.yml and schema refreshing
offline: true

###
# Define required Ansible's variables to satisfy syntax check
# extra_vars:
# secret_ca_passphrase: foobar
# multiline_string_variable: |
# line1
# line2
# complex_variable: ":{;\t$()"

#
# Uncomment to enforce action validation with tasks, usually is not
# needed as Ansible syntax check also covers it.
# skip_action_validation: false

# List of additional kind:pattern to be added at the top of the default
# match list, first match determines the file kind.
kinds:
# - playbook: "**/examples/*.{yml,yaml}"
# - galaxy: "**/folder/galaxy.yml"
# - tasks: "**/tasks/*.yml"
# - vars: "**/vars/*.yml"
# - meta: "**/meta/main.yml"
- playbook: "site.yaml"

#
# List of additional collections to allow in only-builtins rule.
# only_builtins_allow_collections:
# - example_ns.example_collection

#
# only_builtins_allow_modules:
# List of additions modules to allow in only-builtins rule.
# - example_module

#
# Allow setting custom prefix for name[prefix] rule
task_name_prefix: "{stem} | "
###
# Load custom rules from this specific folder
# rulesdir:
# - ./rule/directory/
use_default_rules: true
###
# Complexity related settings

# Limit the depth of the nested blocks:
# max_block_depth: 20
# Enforce variable names to follow pattern below, in addition to Ansible own
# requirements, like avoiding python identifiers. To disable add `var-naming`
# to skip_list.
var_naming_pattern: "^[a-z_][a-z0-9_]*$"
###
# ```{rubric} Warn List
# ```
# ---
# Ansible-lint does not fail on warnings from the rules or tags listed below
# ```{literalinclude} /.ansible-lint
# :start-at: "skip_list:\n"
# ```
warn_list:
- skip_this_tag
- experimental # experimental is included in the implicit list
# - role-name
# - yaml[document-start] # you can also use sub-rule matches
10 changes: 9 additions & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
#!/usr/local/bin/env bash
#!/bin/bash

if [ -f ~/.githooks/coveralls.gpg ]; then
COVERALLS_REPO_TOKEN="$(gpg -d -q "$HOME"/.githooks/coveralls.gpg)"
export COVERALLS_REPO_TOKEN
fi
ANSIBLE_VAULT_PASSWORD_FILE=/etc/ansible/vault
GNUPGHOME=$(pwd)/.gnupg
PIPENV_VENV_IN_PROJECT=1

export ANSIBLE_VAULT_PASSWORD_FILE
export GNUPGHOME
export PIPENV_VENV_IN_PROJECT
14 changes: 7 additions & 7 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
# :language: yaml
# :start-at: "version: 2\n"
# ```
version: 2
#f
# See documentation for possible values
#
# - `"pip"`
updates:
###
# See documentation for possible values
#
# - `"pip"`
- package-ecosystem: "pip"
- directory: "/"
package-ecosystem: "pip"
###
# Location of package manifests
#
# - `"/"`
directory: "/"
schedule:
interval: "weekly"
version: 2
15 changes: 9 additions & 6 deletions .github/workflows/.ansible.txt → .github/workflows/ansible.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ name: ansible-lint
on:
pull_request:
branches: ["main", "stable", "release/v*"]
push:
branches:
- main
workflow_dispatch:
jobs:
build:
###
Expand All @@ -23,14 +27,13 @@ jobs:
- name: Set up Python
uses: actions/setup-python@main
with:
python-version: 3.11
python-version: 3.12
- name: Install requirements
run: |
pip3 install pipenv
pipenv requirements --categories lint > lint
pipenv requirements > reqs
pip3 install -r lint
pip3 install -r reqs
python3 -m venv .venv
.venv/bin/pip3 install pipenv
.venv/bin/pipenv requirements --dev > reqs
python3 -m pip install -r reqs
ansible-galaxy collection install community.crypto
- name: Make ansible directory
run: |
Expand Down
23 changes: 14 additions & 9 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
- name: Install the checker
run: npm i -g markdownlint-cli2 markdownlint-cli2-formatter-junit --save-dev
- name: Lint the Markdown
run: markdownlint-cli2 **/*.md
run: markdownlint-cli2 "#.venv" "*.md" "**/*.md"
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
Expand All @@ -92,17 +92,22 @@ jobs:
- uses: actions/checkout@main
- uses: actions/setup-python@main
with:
python-version: 3.11
cache: pipenv
python-version: 3.12
- name: Setup pages
uses: actions/configure-pages@main
- name: Install pipenv
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
- name: Install Python dependencies
- name: Prep environments
run: |
pipenv install --categories docs
- name: Build the static site
run: pipenv run sphinx-build -a -E . deploy
python3 -m venv .sphinx
.sphinx/bin/pip install -U pip pipenv
- name: Setup pipenv
run: |
PIPENV_VENV_IN_PROJECT=1
export PIPENV_VENV_IN_PROJECT
.sphinx/bin/pipenv install
.sphinx/bin/pipenv install --dev
.sphinx/bin/pipenv install --categories docs
- name: Build artifact
run: .venv/bin/sphinx-build -a -E . deploy
- name: Upload artifact
uses: actions/upload-pages-artifact@main
with:
Expand Down
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
_build/
.gnupg
.secret/
.venv/
.vscode/
.secret/
*.xcf
markdownlint-cli2-junit.xml
node_modules
package-lock.json
package.json
roles/reset/files/*.reset.md
Loading

0 comments on commit 847d78c

Please sign in to comment.