feat(pre-commit): Added linting
This commit is contained in:
@@ -25,7 +25,7 @@ enable_list:
|
|||||||
- no-changed-when
|
- no-changed-when
|
||||||
|
|
||||||
# Offline mode disables any features that require internet access.
|
# Offline mode disables any features that require internet access.
|
||||||
offline: true
|
offline: false
|
||||||
|
|
||||||
# Set the desired verbosity level.
|
# Set the desired verbosity level.
|
||||||
verbosity: 1
|
verbosity: 1
|
||||||
|
|||||||
23
.pre-commit-config.yaml
Normal file
23
.pre-commit-config.yaml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
repos:
|
||||||
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: v4.6.0
|
||||||
|
hooks:
|
||||||
|
- id: trailing-whitespace
|
||||||
|
- id: end-of-file-fixer
|
||||||
|
- id: check-yaml
|
||||||
|
- id: check-added-large-files
|
||||||
|
- repo: local
|
||||||
|
hooks:
|
||||||
|
- id: ansible-galaxy-install
|
||||||
|
name: Install ansible-galaxy collections
|
||||||
|
entry: ansible-galaxy collection install -r requirements.yml
|
||||||
|
language: system
|
||||||
|
pass_filenames: false
|
||||||
|
always_run: true
|
||||||
|
- repo: https://github.com/ansible/ansible-lint
|
||||||
|
rev: v6.22.2
|
||||||
|
hooks:
|
||||||
|
- id: ansible-lint
|
||||||
|
files: \.(yaml|yml)$
|
||||||
|
additional_dependencies:
|
||||||
|
- ansible-core==2.15.8
|
||||||
@@ -688,4 +688,3 @@
|
|||||||
|
|
||||||
# (list) default list of tags to skip in your plays, has precedence over Run Tags
|
# (list) default list of tags to skip in your plays, has precedence over Run Tags
|
||||||
;skip=
|
;skip=
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,19 @@
|
|||||||
cachetools==5.5.2
|
cachetools==5.5.2
|
||||||
certifi==2025.1.31
|
certifi==2025.1.31
|
||||||
|
cfgv==3.4.0
|
||||||
charset-normalizer==3.4.1
|
charset-normalizer==3.4.1
|
||||||
|
distlib==0.4.0
|
||||||
durationpy==0.10
|
durationpy==0.10
|
||||||
|
filelock==3.18.0
|
||||||
google-auth==2.40.3
|
google-auth==2.40.3
|
||||||
|
identify==2.6.12
|
||||||
idna==3.10
|
idna==3.10
|
||||||
kubernetes==33.1.0
|
kubernetes==33.1.0
|
||||||
nc-dnsapi==0.1.3
|
nc-dnsapi==0.1.3
|
||||||
|
nodeenv==1.9.1
|
||||||
oauthlib==3.3.1
|
oauthlib==3.3.1
|
||||||
|
platformdirs==4.3.8
|
||||||
|
pre_commit==4.2.0
|
||||||
proxmoxer==2.2.0
|
proxmoxer==2.2.0
|
||||||
pyasn1==0.6.1
|
pyasn1==0.6.1
|
||||||
pyasn1_modules==0.4.2
|
pyasn1_modules==0.4.2
|
||||||
@@ -17,4 +24,5 @@ requests-oauthlib==2.0.0
|
|||||||
rsa==4.9.1
|
rsa==4.9.1
|
||||||
six==1.17.0
|
six==1.17.0
|
||||||
urllib3==2.3.0
|
urllib3==2.3.0
|
||||||
|
virtualenv==20.32.0
|
||||||
websocket-client==1.8.0
|
websocket-client==1.8.0
|
||||||
|
|||||||
5
requirements.yml
Normal file
5
requirements.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
collections:
|
||||||
|
- name: community.docker
|
||||||
|
- name: community.general
|
||||||
|
- name: kubernetes.core
|
||||||
@@ -16,4 +16,3 @@ TrustedUserCAKeys /etc/ssh/vault-ca.pub
|
|||||||
UseDNS yes
|
UseDNS yes
|
||||||
AcceptEnv LANG LC_*
|
AcceptEnv LANG LC_*
|
||||||
Subsystem sftp /usr/lib/openssh/sftp-server
|
Subsystem sftp /usr/lib/openssh/sftp-server
|
||||||
|
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
service:
|
service:
|
||||||
name: sshd
|
name: sshd
|
||||||
state: restarted
|
state: restarted
|
||||||
become: yes
|
become: true
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
service:
|
service:
|
||||||
name: k3s
|
name: k3s
|
||||||
state: restarted
|
state: restarted
|
||||||
become: yes
|
become: true
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
---
|
---
|
||||||
- include_tasks: installation.yml
|
- name: Install k3s agent
|
||||||
|
include_tasks: installation.yml
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
service:
|
service:
|
||||||
name: k3s
|
name: k3s
|
||||||
state: restarted
|
state: restarted
|
||||||
become: yes
|
become: true
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
service:
|
service:
|
||||||
name: k3s
|
name: k3s
|
||||||
state: restarted
|
state: restarted
|
||||||
become: yes
|
become: true
|
||||||
|
|||||||
@@ -25,7 +25,9 @@
|
|||||||
name: argocd-server
|
name: argocd-server
|
||||||
namespace: "{{ argocd_namespace }}"
|
namespace: "{{ argocd_namespace }}"
|
||||||
register: rollout_status
|
register: rollout_status
|
||||||
until: rollout_status.resources[0].status.readyReplicas is defined and rollout_status.resources[0].status.readyReplicas == rollout_status.resources[0].spec.replicas
|
until: >
|
||||||
|
rollout_status.resources[0].status.readyReplicas is defined and
|
||||||
|
rollout_status.resources[0].status.readyReplicas == rollout_status.resources[0].spec.replicas
|
||||||
retries: 30
|
retries: 30
|
||||||
delay: 10
|
delay: 10
|
||||||
|
|
||||||
|
|||||||
@@ -3,15 +3,12 @@
|
|||||||
ansible.builtin.lineinfile:
|
ansible.builtin.lineinfile:
|
||||||
path: /etc/default/grub
|
path: /etc/default/grub
|
||||||
regexp: "^GRUB_CMDLINE_LINUX_DEFAULT="
|
regexp: "^GRUB_CMDLINE_LINUX_DEFAULT="
|
||||||
line: 'GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt pcie_acs_override=downstream,multifunction initcall_blacklist=sysfb_init video=simplefb:off video=vesafb:off video=efifb:off video=vesa:off disable_vga=1 vfio_iommu_type1.allow_unsafe_interrupts=1 kvm.ignore_msrs=1 modprobe.blacklist=radeon,nouveau,nvidia,nvidiafb,nvidia-gpu,snd_hda_intel,snd_hda_codec_hdmi,i915"'
|
line: >
|
||||||
backup: true
|
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt
|
||||||
register: iommu_result
|
pcie_acs_override=downstream,multifunction initcall_blacklist=sysfb_init
|
||||||
|
video=simplefb:off video=vesafb:off video=efifb:off video=vesa:off
|
||||||
- name: Set GRUB_CMDLINE_LINUX_DEFAULT for PCI passthrough
|
disable_vga=1 vfio_iommu_type1.allow_unsafe_interrupts=1 kvm.ignore_msrs=1
|
||||||
ansible.builtin.lineinfile:
|
modprobe.blacklist=radeon,nouveau,nvidia,nvidiafb,nvidia-gpu,snd_hda_intel,snd_hda_codec_hdmi,i915"
|
||||||
path: /etc/default/grub
|
|
||||||
regexp: "^GRUB_CMDLINE_LINUX_DEFAULT="
|
|
||||||
line: 'GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt pcie_acs_override=downstream,multifunction initcall_blacklist=sysfb_init video=simplefb:off video=vesafb:off video=efifb:off video=vesa:off disable_vga=1 vfio_iommu_type1.allow_unsafe_interrupts=1 kvm.ignore_msrs=1 modprobe.blacklist=radeon,nouveau,nvidia,nvidiafb,nvidia-gpu,snd_hda_intel,snd_hda_codec_hdmi,i915"'
|
|
||||||
backup: true
|
backup: true
|
||||||
register: iommu_result
|
register: iommu_result
|
||||||
|
|
||||||
@@ -34,7 +31,7 @@
|
|||||||
# notify:
|
# notify:
|
||||||
# - Reboot Node
|
# - Reboot Node
|
||||||
|
|
||||||
- name: update grub configuration
|
- name: Update grub configuration
|
||||||
ansible.builtin.command: update-grub
|
ansible.builtin.command: update-grub
|
||||||
when: iommu_result.changed or vfio_result.changed
|
when: iommu_result.changed or vfio_result.changed
|
||||||
# notify:
|
# notify:
|
||||||
|
|||||||
@@ -18,4 +18,3 @@ k3s-agent12
|
|||||||
|
|
||||||
[k3s_loadbalancer]
|
[k3s_loadbalancer]
|
||||||
k3s-loadbalancer
|
k3s-loadbalancer
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,2 @@
|
|||||||
[vps]
|
[vps]
|
||||||
mii
|
mii
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user