I had to reorder your questions to group concepts together.
Andrew Schoen wrote:
Just a few thoughts:
- I'm unsure if we'll need to symlink anything. By default everything is looked for relative to the playbook being ran. I believe this will work even when you aren't running ansible-playbook in the directory where the playbook lives, but not 100% on that. Environment vars might be another good option to tie things together if need be.
Since we have to generate a hosts file, I believe we'll have to generate the playbook as well. Because of that, the playbook we use will likely be in /tmp
and not wherever the roles are defined. I'd like to avoid dealing with things in /etc
but I'm not yet sure how to point to the roles location.
- Will ansible run directly on the teuthology node? I'm assuming so.
Yes, it'll run where teuthology is run. It seems better than running it on remotes in parallel.
Hosts files appear to be INI-style. I've seen the inventory plugins before but I'm not sure if they're helpful here or just unnecessary; it's trivial to dump out hostnames to a tempfile.
- Are we going to worry about calling ansible playbooks from qa-suite now or just handle that later?
- Are we going to provide a way to set your own ansible repo url?
- Will we support using different branches for the ansible repo checkout?
I think one way to handle this would be for the ansible task to take a repo
arg and a branch
arg. If repo
points at a remote URL, we could clone it and select the branch
. If it points at a local path we could simply use that, ignoring the branch
value.
That way we ought to be able to run sets of plays from different repos and/or branches simply by calling the task multiple times with different arguments.
What I'm not sure about, is how to handle secrets configuration.