Where can one go to get questions answered when settings don't work in the labs? I have an issue where entering "ansible -m debug -a "var=ansible_user" cs01" asks for the password and upon entering it I get ecs01 | SUCCES => {"ansible_user": "VARIABLE IS NOT DEFINED!".
I followed the examples provided; however, didn't see where this gets defined in the "inventory" or "ansible.cfg" files.
ej
Well, ansible_user could be set in the inventory, in host_vars or group_vars files, or by a -u option on the command line, at least. Which exercise or lab activity are you looking at? Some of the rest of us here have taken the course and might be able to chime in.
I may have found the culprit to this issue. So I set my .vimrc file to help out with formating and such. Somewhere along the way something got currupted. I was creating new playbooks that kep erroring on "- name:" variable instantiations. This was clue to me that something wasn't formating right. Sure enough after doing a diff between 2 files and adjusting the second file it worked. I blew away my .vimrc files, recreated them and haven't had an issue since.
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.