From c883416f5881c48c54d4a756f1f067ac99442e4c Mon Sep 17 00:00:00 2001 From: David Moreau-Simard Date: Sun, 13 Nov 2016 11:46:13 -0500 Subject: [PATCH] Add a trystack env variable file The trystack environment file sources credentials from OS_* env variables and as such we need to pass them properly in tox. Change-Id: I8abc7c4d4109a178a6547a87aec2c2dbff56b988 --- ansible/lampstack/vars/trystack.yml | 41 +++++++++++++++++++++++++++++ tox.ini | 4 +++ 2 files changed, 45 insertions(+) create mode 100644 ansible/lampstack/vars/trystack.yml diff --git a/ansible/lampstack/vars/trystack.yml b/ansible/lampstack/vars/trystack.yml new file mode 100644 index 0000000..4186837 --- /dev/null +++ b/ansible/lampstack/vars/trystack.yml @@ -0,0 +1,41 @@ +--- +# Copyright Red Hat, Inc. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# + +horizon_url: "https://x86.trystack.org/dashboard/" + +auth: { + auth_url: "http://8.43.86.11:5000/v3", + username: "{{ lookup('env', 'OS_USERNAME') }}", + password: "{{ lookup('env', 'OS_PASSWORD') }}", + project_name: "{{ lookup('env', 'OS_PROJECT_NAME') }}", + domain_name: "default", +} + +app_env: { + ssh_user: "ubuntu", + image_name: "ubuntu1404", + region_name: "regionOne", + availability_zone: "nova", + validate_certs: False, + private_net_name: "private", + flavor_name: "m1.small", + public_key_file: "/root/.ssh/id_rsa.pub", + stack_size: 4, + volume_size: 2, + block_device_name: "/dev/vdb", + wp_theme: "https://downloads.wordpress.org/theme/iribbon.2.0.65.zip", + wp_posts: "http://wpcandy.s3.amazonaws.com/resources/postsxml.zip" +} \ No newline at end of file diff --git a/tox.ini b/tox.ini index 823d707..f3b0e9a 100644 --- a/tox.ini +++ b/tox.ini @@ -22,6 +22,10 @@ deps = setenv = {[testenv]setenv} commands = ansible-playbook -e "action=apply {posargs}" {env:LAMPSTACK_DIR}/site.yml +passenv = + OS_USERNAME + OS_PASSWORD + OS_PROJECT_NAME [testenv:profile] setenv =