AWX / Ansible Tower Integration Setup¶
This guide will walk you through steps to set up AWX / Ansible Tower integration with the nautobot_chatops
App.
Prerequisites¶
Before configuring the integration, please ensure the following:
nautobot-chatops
App was installed with integration extra dependencies.nautobot-chatops
App is set up with at least one enabled chat platform and tested.
Command Setup¶
Create a top-level command named ansible
in your enabled chat platform. For detailed instructions related to your specific chat platform, refer to the platform specific set up.
Configuration¶
You must define the following values in your nautobot_config.py
file:
| Configuration Setting | Mandatory? | Default | Available on Admin Config |
| --------------------- | ---------- | ----------- | ------------------------- |
| `enable_ansible` | Yes | False | Yes |
| `tower_password` | No | | No |
| `tower_uri` | No | | No |
| `tower_username` | No | | No |
| `tower_verify_ssl` | No | True | No |
R: Convert each configuration item to a table row with the setting name, whether it is mandatory or not, and the default value if available.
Below is an example snippet from development/nautobot_config.py
that demonstrates how to enable and configure AWX / Ansible Tower integration:
PLUGINS = ["nautobot_chatops"]
PLUGINS_CONFIG = {
"nautobot_chatops": {
...
"enable_ansible": True,
"tower_password": os.getenv("NAUTOBOT_TOWER_PASSWORD"),
"tower_uri": os.getenv("NAUTOBOT_TOWER_URI"),
"tower_username": os.getenv("NAUTOBOT_TOWER_USERNAME"),
"tower_verify_ssl": is_truthy(os.getenv("NAUTOBOT_TOWER_VERIFY_SSL", True)),
}
}
Upgrading from nautobot-plugin-chatops-ansible
App¶
Warning
When upgrading from nautobot-plugin-chatops-ansible
App, it's necessary to avoid conflicts.
- Uninstall the old App:
- Upgrade the App with required extras:
- Fix
nautobot_config.py
by removingnautobot_chatops_ansible
fromPLUGINS
and merging App configuration intonautobot_chatops
:PLUGINS = [ "nautobot_chatops", # "nautobot_chatops_ansible" # REMOVE THIS LINE ] PLUGINS_CONFIG = { # "nautobot_chatops_ansible": { REMOVE THIS APP CONFIGURATION # MOVE FOLLOWING LINES TO `nautobot_chatops` SECTION # "tower_uri": os.getenv("NAUTOBOT_TOWER_URI"), # "tower_username": os.getenv("NAUTOBOT_TOWER_USERNAME"), # "tower_password": os.getenv("NAUTOBOT_TOWER_PASSWORD"), # "tower_verify_ssl": is_truthy(os.getenv("NAUTOBOT_TOWER_VERIFY_SSL", "true")), # } "nautobot_chatops": { # Enable AWX / Ansible Tower integration "enable_ansible": True, # Following lines are moved from `nautobot_chatops_ansible` "tower_uri": os.getenv("NAUTOBOT_TOWER_URI"), "tower_username": os.getenv("NAUTOBOT_TOWER_USERNAME"), "tower_password": os.getenv("NAUTOBOT_TOWER_PASSWORD"), "tower_verify_ssl": is_truthy(os.getenv("NAUTOBOT_TOWER_VERIFY_SSL", "true")), } }
Environment variables for this integration are the same for both, old and new configuration.