Files
computer-playbook/module_utils
kevinveenbirkenbach 3ce6eb348a refactor(inventory): switch feature flags to docker service config paths
Replace legacy feature flags (features.central_database, features.oauth2) with
docker service based configuration:

- docker.services.database.shared
- docker.services.oauth2.enabled

Update InventoryManager logic accordingly and adapt all unit tests to mock
the new config structure.

This ensures inventory generation now follows the canonical docker service
configuration model.

https://chatgpt.com/share/69628906-5efc-800f-999b-2ae3ece1907f
2026-01-10 18:14:29 +01:00
..
2025-12-17 16:37:21 +01:00
2025-12-17 16:37:21 +01:00
2025-12-17 16:37:21 +01:00
2025-12-17 16:37:21 +01:00
2025-12-17 16:37:21 +01:00
2025-12-17 16:37:21 +01:00
2025-12-18 14:33:54 +01:00
2025-12-18 14:33:54 +01:00

Shared Utility Code (module_utils/) for Infinito.Nexus

This directory contains shared Python utility code (also known as "library code") for use by custom Ansible modules, plugins, or roles in the Infinito.Nexus project.

When to Use module_utils

  • Shared logic: Use module_utils to define functions, classes, or helpers that are shared across multiple custom modules, plugins, or filter/lookups in your project.
  • Reduce duplication: Centralize code such as API clients, input validation, complex calculations, or protocol helpers.
  • Maintainability: If you find yourself repeating code in different custom modules/plugins, refactor it into module_utils/.

Examples

  • Shared HTTP(S) connection handler for multiple modules.
  • Common validation or transformation functions for user input.
  • Utility functions for interacting with Docker, LDAP, etc.

Usage Example

In a custom Ansible module or plugin:

from ansible.module_utils.infinito_utils import my_shared_function

When not to Use module_utils

  • Do not place standalone Ansible modules or plugins here—those go into library/, filter_plugins/, or lookup_plugins/ respectively.
  • Only use for code that will be imported by other plugins or modules.

Further Reading