Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for any linter errors #117

Merged
merged 7 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
profile: production
exclude_paths:
- roles/**/tests/test.yml
- .github
- .vscode
12 changes: 11 additions & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# These github actions will perform linting using pre-commit.
# yamllint disable rule:line-length
# spell-checker: disable
---
name: pre-commit
Expand All @@ -21,14 +20,25 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: install talisman
# yamllint disable rule:line-length
run: |
sudo curl -sLo /usr/local/bin/talisman https://github.com/thoughtworks/talisman/releases/download/v1.32.0/talisman_linux_amd64
sudo chmod 0755 /usr/local/bin/talisman
# yamllint enable rule:line-length
- name: Install terraform-docs
# yamllint disable rule:line-length
run: |
sudo sh -c 'curl -sL https://github.com/terraform-docs/terraform-docs/releases/download/v0.18.0/terraform-docs-v0.18.0-linux-amd64.tar.gz | tar xzf - -C /usr/local/bin'
sudo chmod 0755 /usr/local/bin/terraform-docs
# yamllint enable rule:line-length
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: pip
cache-dependency-path: |
requirements*.txt
- name: install dependencies
run: |
pip install -r requirements-dev.txt
ansible-galaxy collection install --requirements-file ansible-requirements.yaml
- uses: pre-commit/[email protected]
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ kubeconfig*
!ansible/templates/kubernetes/kubeconfig.user.j2

# Ignore VS Code files, except settings.json
.vscode
.vscode/*
!.vscode/settings.json
!.vscode/cSpell.json

# Ignore any pytest caches
.pytest_cache
Expand Down
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ repos:
rev: v24.9.0
hooks:
- id: ansible-lint
# Use the full ansible package, not just ansible-core
# https://ansible.readthedocs.io/projects/lint/configuring/#pre-commit-setup
additional_dependencies:
- ansible
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.95.0
hooks:
Expand Down
6 changes: 4 additions & 2 deletions .talismanrc
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ fileignoreconfig:
- filename: roles/shared/tasks/main.yml
checksum: 7fdf44dc8bfabe5839cc4dae3c014e946aff65208280235c04a43db099f8d62b
- filename: roles/vault/defaults/main.yml
checksum: 2232da9d2fea90e539c0a88742afd740729143d88ac63837affe79b0a060217c
checksum: c7d3e5475ec20225a16b17b0f3f01bd3e64f5b27161c6f3decce42bf5cda8020
- filename: roles/vault/tasks/main.yml
checksum: 9db6fa1ea15d1f1221ebecfc536be9657289a85216dce43690bf7ef1a8ee323b
- filename: vault/kickstart-secrets.tf
Expand All @@ -70,7 +70,7 @@ fileignoreconfig:
- filename: roles/crio/tasks/ubuntu.yml
checksum: 17977771e05f783f83df3d2e71bd86c6f92be65c02a361072fd98a9041218f62
- filename: roles/crio/tasks/debian.yml
checksum: 7a55c5565f4ed159e6004f2851804c578aa23b081cc53e9a806e7a816e624d73
checksum: 1d556ce69804f0fe827b6547c8adce0f706a6275cd1df87567b19129fa7c1197
- filename: roles/shared/templates/scripts/post-onboard-debian.sh.j2
checksum: b9109b9587d4a02f83de60c1aea350afd12cd6608b080de5f0807ca7ee23aecf
- filename: certs/Makefile
Expand All @@ -89,3 +89,5 @@ fileignoreconfig:
checksum: bb7e71a39b91430ce89dce56bcaf94d6d615e151e10b747fb63d5edfa5fdebfe
- filename: kubernetes.yml
checksum: db1c3f78b9659e1d5cbed0397fa02c45142966a8d986a3ae6936b76e01471eee
- filename: roles/external_secrets/defaults/main.yml
checksum: b7cf61e4d734f478ac52808f66f5e256232ecacd65684819101d17de1159208e
115 changes: 115 additions & 0 deletions .vscode/cSpell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
{
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
"version": "0.2",
"language": "en",
"words": [
"acceleratedgcp",
"apiserver",
"arpa",
"autoclean",
"Autodetection",
"autoprovision",
"autoremove",
"bionic",
"bpffs",
"calicoctl",
"centos",
"chmod",
"CIFS",
"creds",
"cri-o",
"crio",
"Customise",
"datacenter",
"Dataplane",
"dearmor",
"devel",
"dgst",
"dpkg",
"dvswitch",
"elrepo",
"endfor",
"esxi",
"fileignoreconfig",
"firewalld",
"fstype",
"gpgcheck",
"gpgkey",
"hashi",
"hashicorp",
"hostvars",
"hugepages",
"ifname",
"ignoreerrors",
"ipaddr",
"ipmi",
"ippool",
"iscsi",
"iscsid",
"isdir",
"kube",
"kubeadm",
"kubeconfig",
"kubectl",
"kubelet",
"kubernetes",
"kubic",
"libcontainers",
"lineinfile",
"loadbalancer",
"markdownlint",
"metacopy",
"modinfo",
"mountopt",
"netboot",
"netfilter",
"netplan",
"nmcli",
"nobest",
"nodev",
"noexec",
"noqa",
"nosuid",
"outform",
"paramiko",
"posix",
"preseed",
"projectcalico",
"proto",
"pubin",
"pubkey",
"pxelinux",
"rbac",
"realpath",
"redhat",
"relatime",
"repos",
"rhel",
"rpcbind",
"runc",
"sbin",
"selectattr",
"selinux",
"smbd",
"storageclass",
"swapfs",
"swapoff",
"syslinux",
"tcpport",
"testinfra",
"tftpd",
"Tigera",
"udpport",
"vcenter",
"vcsa",
"vesamenu",
"vmgmt",
"vmware",
"vnet",
"vsphere",
"wontfix"
],
"flagWords": [
"hte"
]
}
115 changes: 3 additions & 112 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,115 +1,6 @@
{
"ansible.ansible.path": ".direnv/python-3.11.3/bin/ansible",
"ansible.python.interpreterPath": ".direnv/python-3.11.3/bin/python3",
"ansible.validation.lint.path": ".direnv/python-3.11.3/bin/ansible-lint",
"cSpell.words": [
"acceleratedgcp",
"apiserver",
"arpa",
"autoclean",
"Autodetection",
"autoprovision",
"autoremove",
"bionic",
"bpffs",
"calicoctl",
"centos",
"chmod",
"CIFS",
"creds",
"cri-o",
"crio",
"Customise",
"datacenter",
"Dataplane",
"dearmor",
"devel",
"dgst",
"dpkg",
"dvswitch",
"elrepo",
"endfor",
"esxi",
"fileignoreconfig",
"firewalld",
"fstype",
"gpgcheck",
"gpgkey",
"hashi",
"hashicorp",
"hostvars",
"hugepages",
"ifname",
"ignoreerrors",
"ipaddr",
"ipmi",
"ippool",
"iscsi",
"iscsid",
"isdir",
"kube",
"kubeadm",
"kubeconfig",
"kubectl",
"kubelet",
"kubernetes",
"kubic",
"libcontainers",
"lineinfile",
"loadbalancer",
"markdownlint",
"metacopy",
"modinfo",
"mountopt",
"netboot",
"netfilter",
"netplan",
"nmcli",
"nobest",
"nodev",
"noexec",
"noqa",
"nosuid",
"outform",
"paramiko",
"posix",
"preseed",
"projectcalico",
"proto",
"pubin",
"pubkey",
"pxelinux",
"rbac",
"realpath",
"redhat",
"relatime",
"repos",
"rhel",
"rpcbind",
"runc",
"sbin",
"selectattr",
"selinux",
"smbd",
"storageclass",
"swapfs",
"swapoff",
"syslinux",
"tcpport",
"testinfra",
"tftpd",
"Tigera",
"udpport",
"vcenter",
"vcsa",
"vesamenu",
"vmgmt",
"vmware",
"vnet",
"vsphere",
"wontfix"
],
"yaml.schemas": {
"https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/ansible-lint-config.json": "/.ansible-lint"
}
"https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/ansible-lint-config.json": ".ansible-lint"
},
"editor.rulers": [120]
}
16 changes: 16 additions & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
extends: default

rules:
line-length:
max: 120
level: warning
# Force yamllint rules to match ansible-lint requirements
braces:
max-spaces-inside: 1
comments:
min-spaces-from-content: 1
comments-indentation: disable
octal-values:
forbid-explicit-octal: true
forbid-implicit-octal: true
12 changes: 6 additions & 6 deletions ansible-requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
---
collections:
- name: ansible.posix
version: 1.5.1
version: 1.5.4
- name: ansible.utils
version: 2.9.0
version: 4.1.0
- name: community.crypto
version: 2.11.1
version: 2.22.0
- name: community.general
version: 6.5.0
version: 9.4.0
- name: community.hashi_vault
version: 4.2.0
version: 6.2.0
- name: kubernetes.core
version: 2.4.0
version: 3.2.0
Loading