A command-line client for Ansible Automation Platform (AAP) that provides a unified interface for managing AAP resources.
While under development, this package can be installed from a local repository clone in a Python virtual environment.
git clone https://github.com/jce-redhat/python-aapclient.git
cd python-aapclient
python3 -m venv .venv
source .venv/bin/activate
pip install -e .Configure the AAP connection using either environment variables or an .env file. Connection information may also be passed as command-line arguments.
export AAP_HOST=https://your-aap-host.example.com
# use token authentication
export AAP_TOKEN=your-token
# OR username and password authentication
export AAP_USERNAME=your-username
export AAP_PASSWORD=your-password
# Optional SSL configuration (defaults shown)
export AAP_VERIFY_SSL=true # Enable/disable SSL certificate verification (default: true)
export AAP_CA_BUNDLE="" # Path to custom CA certificate bundle (default: none)Create a .env file in your project directory:
# Copy the example and edit with your details
cp env.example .envExample .env file:
# Required: AAP server hostname or URL
AAP_HOST=https://aap-host.example.com/
# Authentication: Use either token OR username/password
AAP_TOKEN=your-aap-token
# OR use username/password authentication
# AAP_USERNAME=your-username
# AAP_PASSWORD=your-password
# Optional: SSL verification (default: true)
# AAP_VERIFY_SSL=false
# Optional: CA bundle for custom certificates
# AAP_CA_BUNDLE=/path/to/ca-bundle.crt
# Optional: Request timeout in seconds (default: 30)
# AAP_TIMEOUT=60- Configure authentication:
export AAP_HOST=https://your-aap-instance.example.com
export AAP_TOKEN=your-api-token- Enable command completion:
source <(aap complete)- Test connectivity:
aap ping- List available commands:
aap --help- Explore resources:
aap organization list
aap project list
aap inventory list- Command-specific help:
aap team create -h
aap credential set -hAll commands follow a consistent pattern:
aap <resource> <action> [options] [arguments]This project is licensed under the Apache License 2.0 - see the LICENSE file for details.