Uploaded image for project: 'Product Technical Learning'
  1. Product Technical Learning
  2. PTL-5420

DO447-82: ch03s09: Typo in tasks file for apache

XMLWordPrintable

    • 3
    • ROLE
    • en-US (English)

      URL: https://role.rhu.redhat.com/rol-rhu/app/courses/do447-2.8/pages/ch03s09
      Reporter RHNID: selliott, msameer-admin
      Section: ch03s09 - Lab: Managing Task Execution
      Language: en-US (English)
      Workaround:

      Description: DO447 - ch03s09 (redhat.com)
      <https://role.rhu.redhat.com/rol-rhu/app/courses/do447-2.8/pages/ch03s09>

      Under section 5, subsection 5.1, the code reads as follows

      # tasks file for apache
      
      - block:
        - name: Ensure httpd packages are installed
          yum:
            name: "{{ item }}"
            state: present*    
          loops:*
            - httpd
            - php
            - git
            - php-mysqlnd
          tags:
            - apache_installer
      
        - name: Ensure SELinux allows httpd connections to a remote database
          seboolean:
            name: httpd_can_network_connect_db
            state: true
            persistent: true
      
        - name: Ensure httpd service is started and enabled
          service:
            name: httpd
            state: started
            enabled: true
          become: true
      

      It should be *loop: *, as you can see by all other *loop: *examples in the
      code on that page. If you update the lab code with loops:, it produces
      the following error as seen in the attached screenshot. If you remove the s
      in loops, it runs properly and no error is produced.

      Amazing what one errant letter can do, eh? Welcome to IT and programming,
      please enjoy your stay.

              rht-sbonnevi Steven Bonneville
              msameer-admin Mohammed Sameer (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: