Files
ansible-collection-infrastr…/README.md
2026-01-30 20:13:58 -05:00

93 lines
2.1 KiB
Markdown

# Infrastructure Collection
Ansible collection for infrastructure management, system configuration, and virtualization.
## Roles
### proxmox-lxc-provision
Manages Proxmox LXC containers with comprehensive lifecycle operations.
- Create, clone, start, stop, and delete containers
- Template conversion and configuration editing
- Post-provisioning tasks and health checks
### system-setup
Performs initial system configuration for new servers.
- Creates admin user with SSH key authentication
- Hardens SSH configuration
- Installs essential packages
- Optional passwordless sudo configuration
### system-maintenance
Updates packages and handles maintenance across multiple distributions.
- Multi-distribution support (Debian/Ubuntu/Alpine)
- Package updates and cleanup
- Automatic reboot handling when required
### nvidia-drivers
Installs NVIDIA drivers and CUDA runtime with proper idempotency and error handling.
- Supports Debian/Ubuntu with automatic OS detection
- Choice between proprietary and open-source drivers
- Post-installation verification and cleanup
- Architecture detection (x86_64/arm64)
## Installation
```bash
ansible-galaxy collection install patrickj.infrastructure
```
## Quick Start
### Basic System Setup
```yaml
```
### Proxmox Container Management
```yaml
- name: Create and start an LXC container
hosts: localhost
connection: local
vars:
- container_hostname: new-debian-container
- os_template: "local:vztmpl/debian-12_amd64.tar.zst"
- container_ipv4: "10.0.0.99"
roles:
- role: proxmox-provision
- name: Configure the LXC container
hosts: new-debian-container
become: yes
tasks:
- include_role:
name: patrickj.infrastructure.system_setup
vars:
password: "{{ admin_password }}"
ssh_pubkey_file: "~/.ssh/id_rsa.pub"
- include_role:
name: patrickj.infrastructure.nvidia_drivers
vars:
nvidia_install_kernel_modules: true
when: gpu_server | default(false)
```
## Requirements
- Ansible >= 2.12
- Root/sudo privileges on target hosts
- community.general collection
- ansible.posix collection
## License
MIT
## Author
Patrick Jaroszewski