The document provides instructions for running an Ansible job to set the message of the day (MOTD) on a VM named motdlab.example.com. It describes logging into Ansible Tower to monitor the job, checking that it completes successfully, and then logging into the motdlab host to view the updated MOTD file. It notes that when running jobs from the Tower UI, the target is automatically set to the current VM, but when running from a service, the target can be specified.
The document provides instructions for running an Ansible job to set the message of the day (MOTD) on a VM named motdlab.example.com. It describes logging into Ansible Tower to monitor the job, checking that it completes successfully, and then logging into the motdlab host to view the updated MOTD file. It notes that when running jobs from the Tower UI, the target is automatically set to the current VM, but when running from a service, the target can be specified.
The document provides instructions for running an Ansible job to set the message of the day (MOTD) on a VM named motdlab.example.com. It describes logging into Ansible Tower to monitor the job, checking that it completes successfully, and then logging into the motdlab host to view the updated MOTD file. It notes that when running jobs from the Tower UI, the target is automatically set to the current VM, but when running from a service, the target can be specified.
4. Refresh the screen until the power state shows on. 5. Click Tower Jobs → Set MOTD. 6. Leave Limit blank and click Submit.
Limit will be automatically set to the VM’s hostname.
9.2. Examine Results
1. You can log into https://ansible1-$GUID.rhpds.opentlc.com with the admin user and password r3dh4t1! . a. From there click JOBS at the top. b. Look for the motd job. 2. Navigate to Automation → Ansible Tower → Jobs. a. The motd job will eventually appear, click Automation on the left side to refresh the screen. b. Eventually the Status should show Successful. Because you are launching from a button, the limit (or the scope Ansible deploys to) is automatically set to the VM on which you are executing the job. You can potentially remove or disable the limit field in the dialog, because it is not used. However, in the next section, you use this same dialog from a service, so keep this limit field because you may want to have separate dialogs for button-initiated jobs and service- initiated jobs. 1. When the job is successful you can SSH to the motdlab host from the workstation host using the IP address:
[root@
In case you forgot the root password is r3dh4t1!
2. Erase the MOTD file:
[root@motdlab ~]# cat /dev/null > /etc/motd
9.3. Execute Ansible Tower Job Using a Service
1. Navigate to Services → Catalogs. 2. Select the Service Catalogs accordion. 3. Select Ansible Tower Jobs → MOTD Job and click Order.