From d5a7f3de8f042d1b2970449d33b402d7b895098c Mon Sep 17 00:00:00 2001 From: Andrew Schoen Date: Fri, 4 Nov 2016 16:35:45 -0500 Subject: [PATCH] tests: require a group_vars folder in the scenario dir This will allow for no changes needed in the ansible playbook command when adding new scenarios. Each scenario will just need a hosts file and a group_vars directory to define how the cluster should be setup. Signed-off-by: Andrew Schoen --- .../ubuntu/16.04/mon/initial_members/group_vars/all | 6 ++++++ tests/functional/ubuntu/16.04/mon/initial_members/hosts | 4 +--- tox.ini | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 tests/functional/ubuntu/16.04/mon/initial_members/group_vars/all diff --git a/tests/functional/ubuntu/16.04/mon/initial_members/group_vars/all b/tests/functional/ubuntu/16.04/mon/initial_members/group_vars/all new file mode 100644 index 000000000..f9c25f288 --- /dev/null +++ b/tests/functional/ubuntu/16.04/mon/initial_members/group_vars/all @@ -0,0 +1,6 @@ +--- + +ceph_stable: True +public_network: "192.168.42.0/24" +cluster_network: "192.168.43.0/24" +journal_size: 100 diff --git a/tests/functional/ubuntu/16.04/mon/initial_members/hosts b/tests/functional/ubuntu/16.04/mon/initial_members/hosts index b3fb91204..4d938c316 100644 --- a/tests/functional/ubuntu/16.04/mon/initial_members/hosts +++ b/tests/functional/ubuntu/16.04/mon/initial_members/hosts @@ -1,4 +1,2 @@ - [mons] -mon0 - +mon0 monitor_interface=eth1 diff --git a/tox.ini b/tox.ini index 808d33dad..94c08c614 100644 --- a/tox.ini +++ b/tox.ini @@ -20,7 +20,7 @@ commands= vagrant up --no-provision --provider=virtualbox bash {toxinidir}/tests/scripts/generate_ssh_config.sh {changedir} - initial-members: ansible-playbook -i {toxinidir}/tests/functional/ubuntu/16.04/mon/initial_members/hosts --extra-vars "ceph_stable=True public_network=192.168.42.0/24 cluster_network=192.168.43.0/24 journal_size=100 monitor_interface=eth1" {toxinidir}/site.yml.sample + ansible-playbook -i {changedir}/hosts {toxinidir}/site.yml.sample py.test -v vagrant destroy --force