Closed larsks closed 8 years ago
Fixed proposed in https://review.gerrithub.io/#/c/266137/
The build image playbooks are never called from quickstart.sh.
This change restores the setting for build image playbook. https://review.gerrithub.io/266417
I think it might be better to document that we need to pass that in globally if using anisble-playbook directly from a venv.
Either approach works...I (personally) favor "it just works" over "did you remember to set _____ per docs?" I also get that we don't want it cluttered throughout. {shrug}
It's not just a question of clutter. It's the maintenance issue of having to remember to put it in particular places anytime we have task that is delegated to localhost
.
One alternative that I looked at earlier but didn't really pursue is dropping the setting in group_vars/all.yml
, where it will be picked up as a default value as long as Ansible finds the group_vars
directory. If we are always running from inside the tripleo-quickstart
directory this is easy.
ahhhh i see. I didn't consider the localhost delegated task issue. The group_vars alternative is interesting. I'm still learning Ansible, is that something only accessible if found (it would be in localhost case...not so much for remote case)? Hrm...in the scenario where one is running either image building or quickstart...on the local host on purpose...that would be problematic. I see why a "doc it, use -e, and move along" makes sense now ;) Thanks for explaining!
I'm still learning Ansible, is that something only accessible if found (it would be in localhost case...not so much for remote case)?
Group variables, like playbooks, only need to exist on the host where you're running ansible. The group_vars
and host_vars
directories are located relative to the playbook you're running. And possibly also relative to your current CWD.
And just to be clear:
The issue is when we delegate a file:
task (or related module) to localhost
; the file
module is what requires libselinux-python
.
now the errors I was/am hitting make more sense. Thanks very much for taking the time to explain.
https://github.com/redhat-openstack/tripleo-quickstart/commit/5a90503c9a76e51c8afc4caaa2a457c195621b58 resolves this for the quickstart case.
When running...
The deploy fails with:
We may want to set ansible_python_interpreter at a higher level...either by restoring the group_vars/all.yml file, or by just passing it on the ansible-playbook command line via -e.