Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lesson 5.5 arrays.yml Playbook Does Not Work #1

Open
noelmiller opened this issue Feb 12, 2020 · 1 comment
Open

Lesson 5.5 arrays.yml Playbook Does Not Work #1

noelmiller opened this issue Feb 12, 2020 · 1 comment

Comments

@noelmiller
Copy link

Sander,

I really appreciate all the work you have done for this course. I have a small correction that needs to be made in order for one of your playbooks to work. It is specifically in the vars/users file.
The error you get when running the playbook without the edit is:
image
The changes I made to arrays2.yml are just for my environment:
image
If you edit the vars/users file to look like this:
image
It will loop properly because in the previous var/users file it has nested hashes which cannot be looped over.
image
If you see the output from the original file, it shows it clearly if you remove the attributes and only do it with one user:
image
Edit I made to only include linda in the original syntax you provided:
image

At any rate, this is what I found, I can feel free to do a pull request to make the change, but I fear you will need to remake the video or add some annotations to it to show the proper syntax so people don't run into the same issue I did.

Let me know I how I can help!

Thanks,

Noel Miller

@noelmiller
Copy link
Author

One thing I forgot to mention, we should be using loop instead of with_items as with_items will be deprecated and for RHCE, they want you to use loop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant