linux_wiki:ansible_awx

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
linux_wiki:ansible_awx [2018/07/07 00:06]
billdozor [Example Template Fields to Use]
linux_wiki:ansible_awx [2018/07/07 00:13]
billdozor [Log Files]
Line 698: Line 698:
   * Web Proxy (nginx): /var/log/nginx/   * Web Proxy (nginx): /var/log/nginx/
   * AWX Web: /var/log/awx/web.log   * AWX Web: /var/log/awx/web.log
 +
 +----
 +
 +===== Procedures =====
 +
 +Common operational procedures.
 +
 +==== Reboots ====
 +
 +Reboot procedure and dependencies.
 +
 +  * Ensure no jobs are running
 +    * Login to the web console: https://serverawx.mycorps.domain.org/#/login
 +    * 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://serverawx.mycorps.domain.org/#/login
 +  * On the left side menu, navigate to: Views > Portal Mode
 +  * Under the "Job Templates", find the desired template and click the rocket picture (Start a job using this template).
 +    * 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 "Launch" to start the job.
 +
 +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: /etc/sudoers.d/ansible-awx
 +    * 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" machine credential
 +      * At the bottom, under "Privilege Escalation Password", click "Replace"
 +      * 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" screen, click the "Verbosity" drop down box and increase it to 1 or higher.
 +
 +----
 +
 +==== Jobs Don't Start/Celery Workers Connection Errors ====
 +
 +**Problem**: Jobs in the portal never start and the celery worker is showing connection errors in its service status<code bash>systemctl status awx-celery-worker</code>
 +
 +\\
 +**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>systemctl status rabbitmq-server</code>
 +
 +----
 +
 +==== Jobs Don't Start/Celery Workers Unknown Tag Errors ====
 +
 +**Problem**: Jobs in the portal never start and the celery worker is showing unknown tag errors in its service status<code bash>systemctl status awx-celery-worker</code>
 +
 +\\
 +**Cause**: The queuing service (celery) is unable to pickup/create messages in RabbitMQ due to residual Rabbit configuration.
 +
 +\\
 +**Fix**: Stop all AWX services, reset RabbitMQ, start all AWX services<code bash># Stop 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</code>
  
 ---- ----
  
  • linux_wiki/ansible_awx.txt
  • Last modified: 2019/05/25 23:50
  • (external edit)