Skip to content

feat: convert orchestrator and discovery domains to Ansible Galaxy collections - #4898

Open
sujit-jadhav wants to merge 2 commits into
dell:issue-4849-omnia-modernizationfrom
sujit-jadhav:feature/galaxy-collections
Open

feat: convert orchestrator and discovery domains to Ansible Galaxy collections#4898
sujit-jadhav wants to merge 2 commits into
dell:issue-4849-omnia-modernizationfrom
sujit-jadhav:feature/galaxy-collections

Conversation

@sujit-jadhav

Copy link
Copy Markdown
Collaborator

Summary

Convert both orchestrator and discovery domains into publishable Ansible Galaxy collections under the omnia namespace.

Changes

Collection Structure

  • Add galaxy.yml, meta/runtime.yml, README.md for both collections
  • Restructure library/plugins/modules/, plugins/module_utils/
  • Restructure callback_plugins/plugins/callback/
  • Move design docs (*_DESIGN.md, INPUT_CONTRACT.md, OUTPUT_CONTRACT.md) to docs/
  • Add .gitignore for dev symlinks and build artifacts

FQCN Updates

  • Update all module calls to FQCN (omnia.<collection>.<module>)
  • Update all role references to FQCN (omnia.<collection>.<role>)
  • Update Python module_utils imports to collection paths
  • Update ansible.cfg files: remove path overrides, use collection callbacks

Galaxy Metadata

  • Add DOCUMENTATION docstrings to all modules (Galaxy import requirement)
  • Add meta/main.yml and README.md to all roles (Galaxy import requirement)

Bug Fixes

  • Fix playbook_dirrole_path in 7 places for sub-playbook compatibility
    • When running from playbooks/ sub-directory, playbook_dir resolved incorrectly

Testing

  • Add GALAXY_TESTING_GUIDE.md with end-to-end test scenarios
  • All tests pass: module resolution (13/13), syntax checks (10/10), validate, credentials

Test Results

Test Discovery Orchestrator
Module resolution ✅ 5/5 ✅ 8/8
Syntax check ✅ 3/3 playbooks ✅ 7/7 playbooks
Validate (--tags validate)
Credential management

How to Test

# Install from Galaxy
ansible-galaxy collection install omnia.discovery omnia.orchestrator --force
ansible-galaxy collection list | grep omnia

# Set paths
DISCOVERY_HOME=~/.ansible/collections/ansible_collections/omnia/discovery
ORCHESTRATOR_HOME=~/.ansible/collections/ansible_collections/omnia/orchestrator

# Syntax check
cd $DISCOVERY_HOME && ansible-playbook discovery.yml --syntax-check
cd $ORCHESTRATOR_HOME && ansible-playbook orchestrator.yml --syntax-check

# Validate
cd $DISCOVERY_HOME && ansible-playbook discovery.yml --tags validate
cd $ORCHESTRATOR_HOME && ansible-playbook orchestrator.yml --tags validate

See src/GALAXY_TESTING_GUIDE.md for full end-to-end test sequence including all sub-playbooks and tag combinations.

- Orchestrator domain:
  - Create roles: orchestrator_setup, orchestrator_functional_groups,
    validate_orchestrator_input, orchestrator_credentials, orchestrator_common
  - Localize library/modules (8 Python modules), module_utils, callback_plugins
  - Create sub-playbooks: prepare, validate, credentials, cleanup, upgrade, rollback
  - Update orchestrator.yml to use local roles (zero ../playbooks/ imports)
  - Update ansible.cfg to use local paths (zero ../common/ references)
  - git mv tasks/ files into orchestrator_common role, remove clone_dependencies
  - Add ORCHESTRATOR_DESIGN.md, INPUT_CONTRACT.md, OUTPUT_CONTRACT.md

- Discovery domain:
  - Create roles: discovery_setup, validate_discovery_input,
    discovery_credentials, discovery_common
  - Localize library/modules (8 Python modules), module_utils, callback_plugins
  - Create sub-playbooks: validate, credentials
  - Update discovery.yml to use local roles (zero ../playbooks/ imports)
  - Update ansible.cfg to use local paths (zero ../common/ references)
  - Add DISCOVERY_DESIGN.md, INPUT_CONTRACT.md, OUTPUT_CONTRACT.md

Both domains now follow the same self-containment pattern as
image_build_manager: zero external ../common/ or ../playbooks/ references.

Relates-to: dell#4849
Signed-off-by: Sujit Jadhav <sujit.jadhav@dell.com>
…llections

Convert both orchestrator and discovery domains into publishable
Ansible Galaxy collections under the omnia namespace (omnia.orchestrator,
omnia.discovery v2.2.0).

Changes:
- Add galaxy.yml, meta/runtime.yml, README.md for both collections
- Restructure library/ -> plugins/modules/, plugins/module_utils/
- Restructure callback_plugins/ -> plugins/callback/
- Update all module calls to FQCN (omnia.<collection>.<module>)
- Update all role references to FQCN (omnia.<collection>.<role>)
- Update Python module_utils imports to collection paths
- Add DOCUMENTATION docstrings to all modules for Galaxy import
- Add meta/main.yml and README.md to all roles
- Update ansible.cfg: remove path overrides, use collection callbacks
- Fix playbook_dir -> role_path for sub-playbook compatibility
- Move design docs to docs/ subdirectory
- Add .gitignore for dev symlinks and build artifacts
- Add GALAXY_TESTING_GUIDE.md with end-to-end test scenarios

Both collections published to https://galaxy.ansible.com/ui/namespaces/omnia/
All syntax checks, module resolution, validate, and credential tests pass.

Signed-off-by: Sujit Jadhav <sujit.jadhav@dell.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant