Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
linux_wiki:ansible_awx [2018/07/07 00:06] billdozor [Example Template Fields to Use] |
linux_wiki:ansible_awx [2019/05/25 23:50] (current) |
||
---|---|---|---|
Line 698: | Line 698: | ||
* Web Proxy (nginx): / | * Web Proxy (nginx): / | ||
* AWX Web: / | * AWX Web: / | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Procedures ===== | ||
+ | |||
+ | Common operational procedures. | ||
+ | |||
+ | ==== Reboots ==== | ||
+ | |||
+ | Reboot procedure and dependencies. | ||
+ | |||
+ | * Ensure no jobs are running | ||
+ | * Login to the web console: https:// | ||
+ | * On the left menu, navigate to: Views -> Jobs | ||
+ | * If no job is currently running, proceed. | ||
+ | * Reboot system | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Running Playbooks ==== | ||
+ | |||
+ | To run a playbook via Ansible AWX: | ||
+ | * Login to the web portal: https:// | ||
+ | * On the left side menu, navigate to: Views > Portal Mode | ||
+ | * Under the "Job Templates", | ||
+ | * Prompt window pop up | ||
+ | * **Inventory** | ||
+ | * Select which inventory (environment) to run against. | ||
+ | * **Other Prompts** | ||
+ | * Limit (Optional): Hostnames comma separated (if wanting to limit to specific systems) | ||
+ | * Verbosity: Default of 0 (Normal) is fine. Increase if you need to debug issues. | ||
+ | * Job Tags (Optional): Enter tags space separated (if wanting to limit what part of the playbook gets run). | ||
+ | * Skip Tags (Optional): Enter tags space separated (if wanting to SKIP certain tags). | ||
+ | * **Preview** | ||
+ | * Verify all settings are good, then click " | ||
+ | |||
+ | Jobs can be monitored a few ways | ||
+ | * Views > Portal Mode | ||
+ | * Right side | ||
+ | * Click "My Jobs" to view just jobs launched by you | ||
+ | * Click "All Jobs" to view all jobs | ||
+ | * Views > Jobs | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Updating Playbook Runner LDAP Password ==== | ||
+ | |||
+ | It is recommended to use a LDAP user account to run the playbooks and a sudoers file that prompts for password. | ||
+ | |||
+ | Examples | ||
+ | * Username: awx-runner | ||
+ | * Sudoers File: / | ||
+ | * Password required for elevated privileges. | ||
+ | |||
+ | When the LDAP password expires: | ||
+ | * Update the password in LDAP. | ||
+ | * Update the password in the Ansible AWX portal | ||
+ | * Login to the portal | ||
+ | * Navigate to: Resources > Credentials. | ||
+ | * Click the "AWX Playbook Runner" | ||
+ | * At the bottom, under " | ||
+ | * Type the new password | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Troubleshooting ===== | ||
+ | |||
+ | Different troubleshooting scenarios and the fix. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== General Playbook Errors ==== | ||
+ | |||
+ | In general, if you run into errors while running a playbook job template: | ||
+ | * Increase the Verbosity and run it again. | ||
+ | * Views > Portal Mode | ||
+ | * Find Job Template to run, click the rocket (Start a job using this template) | ||
+ | * On the "Other Prompts" | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Jobs Don't Start/ | ||
+ | |||
+ | **Problem**: | ||
+ | |||
+ | \\ | ||
+ | **Cause**: The queuing service (celery) is unable to contact the message broker to pick up new jobs. RabbitMQ is probably not running. | ||
+ | |||
+ | \\ | ||
+ | **Fix**: Ensure that RabbitMQ is running | ||
+ | <code bash> | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Jobs Don't Start/ | ||
+ | |||
+ | **Problem**: | ||
+ | |||
+ | \\ | ||
+ | **Cause**: The queuing service (celery) is unable to pickup/ | ||
+ | |||
+ | \\ | ||
+ | **Fix**: Stop all AWX services, reset RabbitMQ, start all AWX services< | ||
+ | systemctl stop awx-celery-worker awx-cbreceiver awx-celery-beat awx-channels-worker awx-daphne awx-web | ||
+ | |||
+ | # Reset RabbitMQ | ||
+ | rabbitmqctl stop_app | ||
+ | rabbitmqctl reset | ||
+ | rabbitmqctl start_app | ||
+ | |||
+ | # Start all AWX services | ||
+ | systemctl start awx-celery-worker awx-cbreceiver awx-celery-beat awx-channels-worker awx-daphne awx-web</ | ||
---- | ---- | ||