chore: repo scaffolding (direnv, ansible.cfg, lint, requirements)
This commit is contained in:
parent
66a1aaad69
commit
be9ac7f78b
7 changed files with 68 additions and 0 deletions
8
.ansible-lint
Normal file
8
.ansible-lint
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
profile: production
|
||||
skip_list:
|
||||
- line-length
|
||||
- no-changed-when
|
||||
exclude_paths:
|
||||
- .venv/
|
||||
- backups/
|
||||
9
.envrc
Normal file
9
.envrc
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# Create .venv automatically if it doesn't exist
|
||||
if [ ! -d .venv ]; then
|
||||
python3 -m venv .venv
|
||||
.venv/bin/python -m pip install -U pip setuptools wheel
|
||||
fi
|
||||
|
||||
# Activate the environment manually (avoids Python 3.13 deprecation warning)
|
||||
export VIRTUAL_ENV=$PWD/.venv
|
||||
PATH_add .venv/bin
|
||||
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
.venv/
|
||||
*.retry
|
||||
__pycache__/
|
||||
*.pyc
|
||||
.DS_Store
|
||||
11
.yamllint
Normal file
11
.yamllint
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
extends: default
|
||||
rules:
|
||||
line-length: disable
|
||||
comments:
|
||||
min-spaces-from-content: 1
|
||||
truthy:
|
||||
allowed-values: ["true", "false", "yes", "no"]
|
||||
ignore: |
|
||||
.venv/
|
||||
backups/
|
||||
19
ansible.cfg
Normal file
19
ansible.cfg
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
[defaults]
|
||||
inventory = inventories/prod/hosts.yml
|
||||
roles_path = roles:~/.ansible/roles
|
||||
collections_path = ~/.ansible/collections
|
||||
host_key_checking = False
|
||||
retry_files_enabled = False
|
||||
interpreter_python = auto_silent
|
||||
nocows = 1
|
||||
timeout = 30
|
||||
stdout_callback = yaml
|
||||
bin_ansible_callbacks = True
|
||||
vault_identity_list = makerfloss@~/.ansible/vault-keys/makerfloss.txt
|
||||
|
||||
[persistent_connection]
|
||||
command_timeout = 60
|
||||
connect_timeout = 60
|
||||
|
||||
[ssh_connection]
|
||||
pipelining = True
|
||||
10
requirements.txt
Normal file
10
requirements.txt
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# Core Ansible
|
||||
ansible==10.3.0
|
||||
|
||||
# Linting & validation
|
||||
ansible-lint==24.7.0
|
||||
yamllint==1.35.1
|
||||
|
||||
# Network connection plugins / SCP for SSH key transfer to RouterOS
|
||||
paramiko>=3.4.0
|
||||
scp>=0.15.0
|
||||
6
requirements.yml
Normal file
6
requirements.yml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
collections:
|
||||
- name: community.routeros
|
||||
version: ">=3.0.0,<4.0.0"
|
||||
- name: ansible.netcommon
|
||||
version: ">=6.0.0,<8.0.0"
|
||||
Loading…
Add table
Reference in a new issue