210 do409 rhat 33 en 1 20190110 chapter 6 managing

This preview shows page 226 - 229 out of 294 pages.

210 DO409-RHAT-3.3-en-1-20190110
CHAPTER 6 | Managing Advanced Inventories 7. Modify the Demo Job Template job template to use the LabGit inventory, and launch a job with it to trigger the caching of its associated managed hosts facts in the fact cache. 7.1. Click Templates in the left navigation bar. 7.2. Click on the link for the Demo Job Template job template. 7.3. Select the LabGit inventory on INVENTORY . 7.4. On CREDENTIAL , select Operations credential under the Machine credential type. 7.5. Select the Use Fact Cache checkbox, and click SAVE to update the job template. See that this job template uses the LabGit inventory, which contains both servere.lab.example.com , and serverf.lab.example.com . 7.6. Scroll down, and click the rocket icon for the Demo Job Template job template to launch a job with that job template. During its execution, this job retrieves the facts for both servere.lab.example.com , and serverf.lab.example.com . 7.7. Wait until the job status is Successful , and click Inventories in the left navigation bar. 7.8. Click on the link for the LabGit inventory, and go to HOSTS . 7.9. Click on the link for servere.lab.example.com , go to FACTS , and verify that the facts for that host are available. You can also verify in the fact lists that the value for the ansible_distribution fact is RedHat . 7.10. Repeat the previous step to verify that the facts for serverf.lab.example.com are available, and check that the value for the ansible_distribution fact is RedHat 8. Create a smart inventory named LabSmart , which includes the Red Hat-based systems available in the LabGit host group. 8.1. Click Inventories in the left navigation bar. 8.2. Click + , and select Smart Inventory to create a new smart inventory. 8.3. On the next screen, fill in the details as follows: FIELD VALUE NAME LabSmart DESCRIPTION Lab Smart Inventory ORGANIZATION Default SMART HOST FILTER ansible_facts.ansible_distribution: RedHat NOTE To enter the host filter, click the magnifying glass icon in SMART HOST FILTER . A new window opens. Enter the host filter's value in the combo box at the top of the window, and click the magnifying glass icon. If you have entered it correctly, the filter should display both servere.lab.example.com and serverf.lab.example.com systems in the LabGit host group at the bottom of the window. Click SAVE to create the smart host filter. 8.4. Click SAVE to create the smart inventory. 8.5. Click HOSTS , and verify that both servere.lab.example.com and serverf.lab.example.com are available. 9. Run the command lab inventory-review grade on workstation to grade your exercise. DO409-RHAT-3.3-en-1-20190110 211
CHAPTER 6 | Managing Advanced Inventories SUMMARY In this chapter, you learned: You can use the awx-manage inventory_import command to import an existing static inventory into Red Hat Ansible Tower. You can use an inventory that is managed externally in a Git repository by configuring the repository as a Project and setting up the inventory source as Sourced from Project .

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture