Migrated from legacy playbook repo into Ansible collection format: Roles (171 total): - common: 44 roles (fact gathering, SSH setup, utilities) - configuration: 32 roles (system config, networking, satellite) - provisioning: 16 roles (VMware, Azure, physical server deployment) - security: 15 roles (OpenSCAP hardening, certificates, AD integration) - monitoring: 12 roles (Zabbix, logging agents, metrics) - networking: 12 roles (DNS, DHCP, network interfaces) - satellite: 4 roles (Pulp/Satellite management) - misc: 36 roles (various utilities) Playbooks (159 total): - provisioning: 14 playbooks - azure: 13 playbooks - configuration: 22 playbooks - maintenance: 10 playbooks - security: 10 playbooks - monitoring: 9 playbooks - vcenter: 6 playbooks - networking: 7 playbooks - misc: 65 playbooks
40 lines
1.0 KiB
Makefile
40 lines
1.0 KiB
Makefile
.PHONY: build clean test lint install docs
|
|
|
|
VERSION := $(shell grep -E '^version:' galaxy.yml | awk '{print $$2}')
|
|
|
|
build:
|
|
ansible-galaxy collection build . --force
|
|
|
|
clean:
|
|
rm -rf dist/ *.egg-info
|
|
find . -type d -name __pycache__ -exec rm -rf {} +
|
|
|
|
test:
|
|
# Run role tests with ansible-test
|
|
@echo "No tests configured yet"
|
|
|
|
lint:
|
|
# Lint all YAML files
|
|
yamllint -c .yamllint.yml roles/ playbooks/ || true
|
|
# Lint Ansible code
|
|
--check --playbooks playbooks/
|
|
|
|
install: build
|
|
ansible-galaxy install dist/*.tar.gz --force
|
|
|
|
docs:
|
|
# Generate documentation from roles
|
|
--doc roles/ > docs/index.md 2>/dev/null || echo "Documentation not available"
|
|
|
|
help:
|
|
@echo "Ansible Collection Makefile"
|
|
@echo ""
|
|
@echo "Targets:"
|
|
@echo " build - Build the collection tarball"
|
|
@echo " clean - Remove build artifacts"
|
|
@echo " test - Run tests (not configured)"
|
|
@echo " lint - Run linters on roles and playbooks"
|
|
@echo " install - Install to local system"
|
|
@echo " docs - Generate documentation"
|
|
@echo " help - Show this help"
|