feat: introduce modular extension system and refactor network discovery#64
Merged
Conversation
**Added:**
- Extension playbooks for modular provisioning:
- `ext-elk.yml` for ELK stack deployment
- `ext-exchange.yml` for Microsoft Exchange
- `ext-guacamole.yml` for Apache Guacamole remote access
- `ext-lx01.yml` for Linux domain enrollment
- `ext-wazuh.yml` for Wazuh manager/agents
- `ext-ws01.yml` for hardened workstation
- Role stubs for new server features:
- `add_dns_record`, `exchange_bot`, `linux_add_linux_to_domain`,
`linux_guacamole`, `linux_guacamole_create_connections`,
`linux_tomcat`, `network_discovery`, `wazuh_agent_linux`
- Playbook `network_setup.yml` for runtime network detection and mapping
- Vars plugin `lab_config.py` for automatic lab config injection
- Role `network_discovery` to replace inline network fact gathering
- Role documentation READMEs for new and stub roles
- DRACARYS lab files, configs, and assets for new challenge environment
- CLI extension management commands (`extension.go`) for listing and
provisioning extensions
- Extension inventories, provider configs, and data directories for
ELK, Exchange, Guacamole, Wazuh, lx01, and ws01
- Example FQDN documentation (`docs/FQDNs.md`)
**Changed:**
- Playbooks now rely on `lab_config` plugin for loading lab config,
removing redundant `data.yml` include pattern
- All extension Ansible content moved to `extensions/` directory
- ELK and Wazuh extension roles and data refactored out of core tree
- Improved idempotency and Ansible role naming conventions in playbooks
- Updated main playbook workflow to use `network_setup.yml` for
network discovery
- `.pre-commit-config.yaml` and `.hooks/linters/ansible-lint.yaml`
exclude extension and network setup playbooks from linting
- `requirements.yml` updated to include new role dependencies
- Documentation and diagrams updated to reflect new roles/playbooks
- `galaxy.yml` updated to ignore `extensions` directory in builds
**Removed:**
- Legacy extension playbooks and roles from `ansible/extensions`
- Old `data.yml` and inline network detection logic from playbooks
- Deprecated extension inventories and role tasks now modularized
under `extensions/`
- ELK, Exchange, Wazuh, and ws01 extension content from main tree
(now in extension modules)
**Added:** - Introduced `.github/workflows/goreleaser.yaml` for automated GoReleaser-based release workflow on tag push - Added `.goreleaser.yaml` to configure multi-arch builds, ldflags, and prebuild hooks for the CLI binary - Added `SetVersionInfo` function to set CLI version info from ldflags at build time **Changed:** - Updated all CLI command files to handle errors returned from `config.Get()` and propagate them instead of panicking or ignoring - Improved config initialization: `config.Init()` now returns errors and handles missing or invalid config files robustly - Refactored `findProjectRoot`, `AnsibleEnv`, and related config functions to return errors instead of using fallback or silent failure - Updated ansible runner and retry logic to handle errors from config and ansible environment generation, improving reliability and diagnostics - Modified root command initialization to ensure config is initialized and validated before command execution; improved viper flag binding with error checking - Updated tests to handle new error returns from `AnsibleEnv` and `findProjectRoot` - Changed playbook order assertion in tests to expect `network_setup.yml` as the first default playbook **Removed:** - Eliminated silent error ignoring in config loading and project root discovery, making failures explicit
feat: add initial dreadgoad CLI configuration file **Added:** - Introduced `dreadgoad.yaml` with settings for environment, retries, timeouts, and per-environment variant configuration for the DreadGOAD CLI
…ogic
**Changed:**
- Updated `GoadPath` methods to align with new extension file structure,
moving Ansible-related files to `ansible/playbooks/{templates,files}/extensions`
and provider configs to top-level `providers/`
- Refactored extension inventory/template/data/config path resolution to match
the new structure in `goadpath.py`
- Adjusted provider path methods to locate provider configs under `providers/`
- Modified `LabInstance` extension inventory rendering to use new Jinja template
locations and file names
- Updated extension discovery in `Lab` to iterate through
`ansible/playbooks/files/extensions` for available extensions
**Removed:**
- Deleted all extension folders and files from `extensions/`, including
ELK, Exchange, Guacamole, LX01, Wazuh, and WS01, as part of the migration to
the new Ansible-centric directory layout
…file paths **Added:** - Introduced inventory templates for extensions (elk, exchange, guacamole, lx01, wazuh, ws01) in `ansible/playbooks/templates/extensions/` - Added extension configuration files for exchange, lx01, ws01 in `ansible/playbooks/files/extensions/` - Added Guacamole configuration file `guacamole.yml` for extension deployment **Changed:** - Updated labeler rules to match new extension template/data locations and provider directory structure - Refactored extension-related path functions in config to use new Ansible collection directories for inventory templates and data files - Updated extension provisioning logic to use new data directory paths for Guacamole vars file - Improved documentation in config methods to clarify new directory structure **Removed:** - Excluded `extensions` from `build_ignore` in `ansible/galaxy.yml` to align with new file organization and avoid ignoring essential extension files
…change, ws01 **Added:** - Introduced VM definitions for elk, wazuh, guacamole, exchange, and ws01 roles across AWS, Azure, Proxmox, VirtualBox, VMware, and Ludus platforms - Provided Terraform configurations for each role on relevant cloud providers, including platform-specific settings like AMIs, instance sizes, IPs, and authentication details - Added Ludus YAML configs for each VM type to support Ludus-based deployment - Included Vagrantfiles for VirtualBox and VMware for local VM creation, specifying resource allocations and networking for each VM - Added extended Proxmox configuration example for ws01, demonstrating variable definitions and merging for advanced scenarios **Changed:** - No existing files were changed; all additions are new resources for VM provisioning across multiple platforms **Removed:** - No files or configurations were removed in this change
**Changed:** - Disabled the MD011 rule (no reversed links) in markdownlint configuration to allow more flexibility in markdown formatting - .hooks/linters/markdownlint.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Key Changes:
network_discoveryrole and playbookdata.ymlapproach with an automatic lab config vars pluginAdded:
dreadgoad extension list,provision,provision-all) for managing extensionsext-elk.yml,ext-exchange.yml,ext-guacamole.yml,ext-lx01.yml,ext-wazuh.yml,ext-ws01.ymllinux_guacamole,add_dns_record,wazuh_manager)network_setup.ymlplaybook andnetwork_discoveryrole for robust network fact gatheringlab_config.py) to auto-load lab JSON configs for all hostsdreadgoad.yamlsample config and improved extension metadata in configChanged:
network_setup.ymlfor network fact gatheringdata.ymlimports removed from playbooks; lab config is now injected by the vars plugin/extensions/<name>/and referenced via new config methodsRemoved:
ansible/extensionsand related extension playbooks, roles, and inventories from the main playbook treedata.ymlimports and related ad-hoc fact setting logic from playbooks