cancel
Showing results for 
Search instead for 
Did you mean: 
Rhuobhe
Cadet
Cadet
  • 315 Views

Chapter 3 Guided Exercise: Managing Variables - lab start data-variables

Jump to solution

 

Hi I am following the steps on the lab and running into this error. I've checked several times my playbook looks ok. The video is a little different it includes a python_pkg variable but I still can't get it to run.

 

Rhuobhe_0-1751814362317.png

 

1 Solution

Accepted Solutions
Travis
Moderator
Moderator
  • 306 Views

@Rhuobhe -

The problem is you aren't following the instructions or directions like in the book. Technically, it isn't even trying to execute your playbook. While there might still be errors in the playbook you've created, the real issue is you are attempting to run the ansible-navigator command as the "root" user since you have "SUDO" in as part of the command. You shouldn't need to run things as root and additionally, if tasks require root or another user, that should be done with Ansible using the "become" and "become_user". The lab environment is disconnected and we've already downloaded and setup the execution environment container images for the "student" user. The output of our command shows it is attempting to download the container image for the execution environment and failing because the root user isn't logged into Red Hat's container registry and therefore, the download isn't authorized. 

You should be able to remove "SUDO" from your command and it should at least attempt to run the playbook as the student user. At that point, you might find additional errors or syntax issues with your playbook.

Travis Michette, RHCA XIII
https://rhtapps.redhat.com/verify?certId=111-134-086
SENIOR TECHNICAL INSTRUCTOR / CERTIFIED INSTRUCTOR AND EXAMINER
Red Hat Certification + Training

View solution in original post

1 Reply
Travis
Moderator
Moderator
  • 307 Views

@Rhuobhe -

The problem is you aren't following the instructions or directions like in the book. Technically, it isn't even trying to execute your playbook. While there might still be errors in the playbook you've created, the real issue is you are attempting to run the ansible-navigator command as the "root" user since you have "SUDO" in as part of the command. You shouldn't need to run things as root and additionally, if tasks require root or another user, that should be done with Ansible using the "become" and "become_user". The lab environment is disconnected and we've already downloaded and setup the execution environment container images for the "student" user. The output of our command shows it is attempting to download the container image for the execution environment and failing because the root user isn't logged into Red Hat's container registry and therefore, the download isn't authorized. 

You should be able to remove "SUDO" from your command and it should at least attempt to run the playbook as the student user. At that point, you might find additional errors or syntax issues with your playbook.

Travis Michette, RHCA XIII
https://rhtapps.redhat.com/verify?certId=111-134-086
SENIOR TECHNICAL INSTRUCTOR / CERTIFIED INSTRUCTOR AND EXAMINER
Red Hat Certification + Training
Join the discussion
You must log in to join this conversation.