Tracy_Baker
Starfighter Starfighter
Starfighter
  • 437 Views

Issue with Red Hat Enterprise Linux Automation with Ansible 9.0 (RH294), lab 9.11

Red Hat Enterprise Linux Automation with Ansible 9.0 (RH294), lab 9.11, there's a bit of an inconsistency.

First, there is this, which creates the username and groups variables that will be used a bit later in the lab:

1.JPG

Then there is this:

2.JPG

The issue is this: Step 2.1 creates the groups variable; however, Step 2.3 does not use it - instead, it hard codes in the webadmin group name. It uses username, but not groups. If groups wasn't going to used in the playbook, why define it?

I'd suggest that the task be changed to this, so the groups variable gets used:

    - name: Create user accounts
      ansible.builtin.user:
        name: "{{ item['username'] }}"
        groups: "{{ item['groups'] }}"
      loop: "{{ users }}"

The lab's grading script works just fine with this change.

Program Lead at Arizona's first Red Hat Academy, est. 2005
Estrella Mountain Community College
Labels (5)
0 Replies
Join the discussion
You must log in to join this conversation.