-
Notifications
You must be signed in to change notification settings - Fork 4
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
ANSIBLE: 'ansible_lsb' variable is undefined for CentOS #5
Comments
|
@WanderingZombie came here because of same error, installing redhat-lsb-core doesn't solve my issue. |
Note that you have to make sure |
This issue can be closed I think :) That's some undocumented stuff. Would be nice to add this to ansible docs itself. |
@holms It is documented, I don't now if it was nine days ago but it is today: Look for this: And read the note below. |
That note in there definitely haven't been there before. Been pulling my hairs and wtf'ing what's going on, when in freenode someone told me about this package. Thanks |
@holms Glad to hear you're pulling hairs anymore!!! Cheers! |
@holms Guess what:
I still get this: If I log into the node there is the binary:
There goes the hair pulling, ha! |
@einarc well like they said above, this package should be installed, before you run playbook :) That means it should be in core image of whatever cloud provider you're using, and that's actually bad.. I wonder if aws/do/gcloud has in centos core image. Maybe it's possible just to regather facts with second playbook in a row, in one file.. haven't tried yet. |
@holms I couldn't agree more, the core image of this RHEL7 x64 HVM AWS image is missing so many things that I have to compensate for that is taking longer than expected to do a good wordpress install. On the other hand, they offer Bitnami, but that's not what the team wants here. |
@holms Actually installing lsb_release does handle the issue. The problem is in the usage of this: "{{ansible_lsb.release|int}}" It is NOT the same as this: ansible_lsb.release|int The first one is a local user defined variable, the second one is an ansible environment one. Therefore it does not get defined. |
Facts are collected at the beginning of the playbook. If you install This is fatal:
This works:
|
'ansible_lsb' is undefined
What about using a default value? http://docs.ansible.com/playbooks_variables.html#forcing-variables-to-be-defined
The text was updated successfully, but these errors were encountered: