]> git.apps.os.sepia.ceph.com Git - teuthology.git/commit
task.ansible: Allow passing in custom group_vars
authorZack Cerza <zack@redhat.com>
Wed, 21 Mar 2018 23:37:32 +0000 (17:37 -0600)
committerZack Cerza <zack@redhat.com>
Fri, 30 Mar 2018 21:25:13 +0000 (15:25 -0600)
commit24a667b71b3424054f385e42f044e982ef4e308c
tree6f0fab1a2866be1faddde9e6dee454f61afc9c42
parent2b80e2ffd48a1564c54801119e46b12a18705d48
task.ansible: Allow passing in custom group_vars

Up until now, if you wanted to inject vars to a playbook run, you had to
use --extra-vars, which don't behave the same way that group_vars do.
This commit adds that functionality.

We look for a 'group_vars' dict in the task's config object. If it's
there, we create group_vars files with names taken from the keys, and
content taken from the values.

Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/task/ansible.py
teuthology/task/cephmetrics.py
teuthology/test/task/test_ansible.py