Ansible - Start Stop Restart Ansible Tower

by
Jeremy Canfield |
Updated: April 09 2020
| Ansible articles
The ansible-tower-service start and restart commands can be used to start or restart the Ansible services.
ansible-tower-service start
. . .
Starting Tower
Redirecting to /bin/systemctl start rh-postgresql10-postgresql.service
Redirecting to /bin/systemctl start rabbitmq-server.service
Redirecting to /bin/systemctl start nginx.service
Redirecting to /bin/systemctl start supervisord.service
The ansible-tower-service stop command can be used to stop the Ansible services.
ansible-tower-service stop
. . .
Stopping Tower
Redirecting to /bin/systemctl stop rh-postgresql10-postgresql.service
Redirecting to /bin/systemctl stop rabbitmq-server.service
Redirecting to /bin/systemctl stop nginx.service
Redirecting to /bin/systemctl stop supervisord.service
The ansible-tower-service status command can be used to determine if the services are running.
ansible-tower-service status
. . .
â— rh-postgresql10-postgresql.service - PostgreSQL database server
Loaded: loaded (/usr/lib/systemd/system/rh-postgresql10-postgresql.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 2020-03-08 04:15:33 CDT; 1 months 1 days ago
â— rabbitmq-server.service - RabbitMQ broker
Loaded: loaded (/usr/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 2020-03-08 04:15:40 CDT; 1 months 1 days ago
â— nginx.service - The nginx HTTP and reverse proxy server
Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 2020-03-08 04:19:23 CDT; 1 months 1 days ago
Likewise, the ps command can be used to determine if there are Ansible Tower processes running.
ps -ef | grep tower
. . .
awx 3203 3200 0 12:57 ? 00:00:00 scl enable rh-postgresql10 /var/lib/awx/venv/awx/bin/uwsgi -s /var/run/tower/uwsgi.sock --module=awx.wsgi:application --vacuum --processes=5 --harakiri=120 --no-orphans --master --max-requests=1000 --lazy-apps -b 32768 --stats /var/lib/awx/uwsgi.stats --chmod-socket=660
awx 3205 3200 33 12:57 ? 00:00:01 python3 /var/lib/awx/venv/awx/bin/daphne -u /var/run/tower/daphne.sock awx.asgi:channel_layer
awx 3223 3207 2 12:57 ? 00:00:00 /var/lib/awx/venv/awx/bin/uwsgi -s /var/run/tower/uwsgi.sock --module=awx.wsgi:application --vacuum --processes=5 --harakiri=120 --no-orphans --master --max-requests=1000 --lazy-apps -b 32768 --stats /var/lib/awx/uwsgi.stats --chmod-socket=660
awx 3231 3223 44 12:57 ? 00:00:00 /var/lib/awx/venv/awx/bin/uwsgi -s /var/run/tower/uwsgi.sock --module=awx.wsgi:application --vacuum --processes=5 --harakiri=120 --no-orphans --master --max-requests=1000 --lazy-apps -b 32768 --stats /var/lib/awx/uwsgi.stats --chmod-socket=660
awx 3232 3223 48 12:57 ? 00:00:00 /var/lib/awx/venv/awx/bin/uwsgi -s /var/run/tower/uwsgi.sock --module=awx.wsgi:application --vacuum --processes=5 --harakiri=120 --no-orphans --master --max-requests=1000 --lazy-apps -b 32768 --stats /var/lib/awx/uwsgi.stats --chmod-socket=660
awx 3233 3223 41 12:57 ? 00:00:00 /var/lib/awx/venv/awx/bin/uwsgi -s /var/run/tower/uwsgi.sock --module=awx.wsgi:application --vacuum --processes=5 --harakiri=120 --no-orphans --master --max-requests=1000 --lazy-apps -b 32768 --stats /var/lib/awx/uwsgi.stats --chmod-socket=660
awx 3234 3223 46 12:57 ? 00:00:00 /var/lib/awx/venv/awx/bin/uwsgi -s /var/run/tower/uwsgi.sock --module=awx.wsgi:application --vacuum --processes=5 --harakiri=120 --no-orphans --master --max-requests=1000 --lazy-apps -b 32768 --stats /var/lib/awx/uwsgi.stats --chmod-socket=660
awx 3235 3223 42 12:57 ? 00:00:00 /var/lib/awx/venv/awx/bin/uwsgi -s /var/run/tower/uwsgi.sock --module=awx.wsgi:application --vacuum --processes=5 --harakiri=120 --no-orphans --master --max-requests=1000 --lazy-apps -b 32768 --stats /var/lib/awx/uwsgi.stats --chmod-socket=660
Did you find this article helpful?
If so, consider buying me a coffee over at