Skip to content

Latest commit

 

History

History
139 lines (106 loc) · 3.87 KB

File metadata and controls

139 lines (106 loc) · 3.87 KB

Changelog - Version 3.3.10

Date: 2026-01-21

Changes for Gateway Support (AAP 2.6+)

New Features

1. Mesh Topology Support

  • Added support for gateways (hop nodes) in Ansible Tower 3.6+
  • Compatible with AAP 2.6+
  • Gateways are managed as an extension of existing instances

2. New Fields in tower_cli/resources/instance.py

Mesh Topology Fields:

  • node_type - Node type: execution, hop (gateway), or hybrid
  • node_state - Current state of node in mesh topology
  • listener_port - Port for receptor mesh listener (gateway nodes)

Monitoring Fields:

  • cpu - CPU usage percentage
  • memory - Memory usage percentage
  • last_seen - Last contact timestamp

3. New CLI Commands

tower-cli instance health

tower-cli instance health --instance <name_or_id>

Retrieves detailed health information for an instance or gateway.

tower-cli instance jobs

tower-cli instance jobs --instance <name_or_id>

Lists jobs currently running on a specific instance.

Technical Changes

Modified Files:

  1. tower_cli/resources/instance.py

    • Added imports: resources, exceptions, client, types, click
    • Added 6 new fields for mesh topology and monitoring
    • Implemented 2 new methods: health() and jobs()
    • Included fallbacks for compatibility with previous Tower versions
  2. tower_cli/constants.py

    • Version updated from 3.3.9 to 3.3.10

Compatibility

Backward Compatibility

  • ✅ Fully compatible with previous Tower versions
  • ✅ New fields are optional and ignored if not supported
  • ✅ Automatic fallbacks for health and jobs commands on Tower < 3.6

Supported Versions

  • Ansible Tower 3.6 or higher (for all features)
  • AWX 9.0 or higher
  • AAP 2.6 or higher
  • Also works with Tower < 3.6 (gateway features disabled)

Implementation Approach

Architectural Decision: We chose to extend instance.py instead of creating a separate gateway.py file because:

  1. Gateways are a type of instance in Tower's API (endpoint /instances/)
  2. Maintains compatibility with existing code
  3. Reduces code duplication
  4. Easier to maintain
  5. Reflects the actual Ansible Tower architecture

Breaking Changes

None - This is a backward-compatible release.

Usage Examples

List all gateways:

tower-cli instance list --node-type hop

Configure a node as gateway:

tower-cli instance modify --hostname gateway-01 --node-type hop

Monitor gateway health:

tower-cli instance health --instance gateway-01 --format json

Development Notes

Testing

To test these changes you need:

  • Ansible Tower 3.6+ or AWX 9.0+ configured with mesh topology
  • At least one node configured as gateway (hop)
  • Valid credentials for API access

Dependencies

No new dependencies added. Project still uses:

  • click < 7.0
  • colorama >= 0.3.1
  • requests >= 2.3.0
  • six >= 1.7.2
  • PyYAML >= 3.10

Documentation

  • Added GATEWAY_SUPPORT_EN.md file with complete documentation
  • Includes examples, use cases and troubleshooting
  • Explains architectural differences from "gateway as separate resource" approach

Known Limitations

  1. health and jobs commands require Tower 3.6+ for full functionality
  2. listener_port field may not be modifiable via CLI (depends on Tower configuration)
  3. On Tower < 3.6, mesh topology fields are silently ignored

Migration from Previous Versions

No migration needed. Simply upgrade with:

pip install --upgrade .

Credits

Changes implemented to support AAP 2.6+ and the gateway component of Ansible Tower.

Suggested Next Steps

  1. Testing on Tower 3.6+ environment with configured gateways
  2. Validation of health and jobs commands
  3. Verification of backward compatibility with Tower 3.5 and earlier
  4. Possible addition of automated tests

Author: rUser75 Project: https://github.com/rUser75/tower-cli