Reorganize test playbooks
The following changes have been made to reorganize the structure of this role's test playbooks, bringing them into line with other OpenStack-Ansible roles: - move each playbook to an individual file - rename playbooks descriptively - define hosts and groups directly in the inventory file - include group vars required by containers - store extra variables in a single shared test-vars file - remove use of the openstack_hosts role - include callback plugin for human readable logging of test tasks Change-Id: I4829e368003f58685cb96b7ee743255d00542187
This commit is contained in:
parent
a94f88dddc
commit
a37735c3fb
|
@ -14,10 +14,6 @@
|
||||||
src: https://git.openstack.org/openstack/openstack-ansible-lxc_container_create
|
src: https://git.openstack.org/openstack/openstack-ansible-lxc_container_create
|
||||||
scm: git
|
scm: git
|
||||||
version: master
|
version: master
|
||||||
- name: openstack_hosts
|
|
||||||
src: https://git.openstack.org/openstack/openstack-ansible-openstack_hosts
|
|
||||||
scm: git
|
|
||||||
version: master
|
|
||||||
- name: galera_client
|
- name: galera_client
|
||||||
src: https://git.openstack.org/openstack/openstack-ansible-galera_client
|
src: https://git.openstack.org/openstack/openstack-ansible-galera_client
|
||||||
scm: git
|
scm: git
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
---
|
||||||
|
# Copyright 2016, Rackspace US, Inc.
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
container_name: "{{ inventory_hostname }}"
|
||||||
|
container_networks:
|
||||||
|
management_address:
|
||||||
|
address: "{{ ansible_host }}"
|
||||||
|
bridge: "lxcbr0"
|
||||||
|
interface: "eth1"
|
||||||
|
netmask: "255.255.252.0"
|
||||||
|
type: "veth"
|
||||||
|
physical_host: localhost
|
||||||
|
properties:
|
||||||
|
service_name: "{{ inventory_hostname }}"
|
|
@ -1,6 +1,13 @@
|
||||||
[all]
|
[all]
|
||||||
localhost ansible_connection=local ansible_become=True
|
localhost ansible_connection=local ansible_become=True
|
||||||
|
container1 ansible_ssh_host=10.100.100.101 ansible_host=10.100.100.101 ansible_become=True ansible_user=root
|
||||||
|
container2 ansible_ssh_host=10.100.100.102 ansible_host=10.100.100.102 ansible_become=True ansible_user=root
|
||||||
|
container3 ansible_ssh_host=10.100.100.103 ansible_host=10.100.100.103 ansible_become=True ansible_user=root
|
||||||
|
|
||||||
[hosts]
|
[galera_test_hosts]
|
||||||
localhost ansible_ssh_host=127.0.0.1
|
container1
|
||||||
|
container2
|
||||||
|
container3
|
||||||
|
|
||||||
|
[all_containers:children]
|
||||||
|
galera_test_hosts
|
||||||
|
|
|
@ -13,44 +13,12 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: Playbook for testing
|
- name: Run functional tests
|
||||||
hosts: galera_test_hosts
|
hosts: galera_test_hosts
|
||||||
user: root
|
user: root
|
||||||
gather_facts: true
|
gather_facts: true
|
||||||
vars:
|
|
||||||
galera_root_password: secrete
|
|
||||||
galera_root_user: root
|
|
||||||
pre_tasks:
|
|
||||||
- debug:
|
|
||||||
msg: "===== Running Function Tests ====="
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Create DB for service on 10.100.100.101
|
- name: Check cluster incoming addresses
|
||||||
mysql_db:
|
|
||||||
login_user: "{{ galera_root_user }}"
|
|
||||||
login_password: "{{ galera_root_password }}"
|
|
||||||
login_host: "10.100.100.101"
|
|
||||||
name: "OSA-test"
|
|
||||||
state: "present"
|
|
||||||
tags:
|
|
||||||
- neutron-db-setup
|
|
||||||
when: ansible_ssh_host == '10.100.100.101'
|
|
||||||
- name: Grant access to the DB on 10.100.100.102
|
|
||||||
mysql_user:
|
|
||||||
login_user: "{{ galera_root_user }}"
|
|
||||||
login_password: "{{ galera_root_password }}"
|
|
||||||
login_host: "10.100.100.102"
|
|
||||||
name: "osa-tester"
|
|
||||||
password: "tester-secrete"
|
|
||||||
host: "{{ item }}"
|
|
||||||
state: "present"
|
|
||||||
priv: "OSA-test.*:ALL"
|
|
||||||
with_items:
|
|
||||||
- "localhost"
|
|
||||||
- "%"
|
|
||||||
tags:
|
|
||||||
- neutron-db-setup
|
|
||||||
when: ansible_ssh_host == '10.100.100.102'
|
|
||||||
- name: check cluster state incoming addresses
|
|
||||||
command: |
|
command: |
|
||||||
mysql -h {{ ansible_ssh_host }} \
|
mysql -h {{ ansible_ssh_host }} \
|
||||||
-p"{{ galera_root_password }}" \
|
-p"{{ galera_root_password }}" \
|
||||||
|
@ -58,7 +26,7 @@
|
||||||
--silent \
|
--silent \
|
||||||
--skip-column-names
|
--skip-column-names
|
||||||
register: wsrep_incoming_addresses
|
register: wsrep_incoming_addresses
|
||||||
- name: check cluster state
|
- name: Check cluster local state
|
||||||
command: |
|
command: |
|
||||||
mysql -h {{ ansible_ssh_host }} \
|
mysql -h {{ ansible_ssh_host }} \
|
||||||
-p"{{ galera_root_password }}" \
|
-p"{{ galera_root_password }}" \
|
||||||
|
@ -66,7 +34,7 @@
|
||||||
--silent \
|
--silent \
|
||||||
--skip-column-names
|
--skip-column-names
|
||||||
register: wsrep_local_state_comment
|
register: wsrep_local_state_comment
|
||||||
- name: check cluster state
|
- name: Check cluster evs state
|
||||||
command: |
|
command: |
|
||||||
mysql -h {{ ansible_ssh_host }} \
|
mysql -h {{ ansible_ssh_host }} \
|
||||||
-p"{{ galera_root_password }}" \
|
-p"{{ galera_root_password }}" \
|
||||||
|
@ -82,3 +50,27 @@
|
||||||
- "'10.100.100.101' in wsrep_incoming_addresses.stdout"
|
- "'10.100.100.101' in wsrep_incoming_addresses.stdout"
|
||||||
- "'10.100.100.102' in wsrep_incoming_addresses.stdout"
|
- "'10.100.100.102' in wsrep_incoming_addresses.stdout"
|
||||||
- "'10.100.100.103' in wsrep_incoming_addresses.stdout"
|
- "'10.100.100.103' in wsrep_incoming_addresses.stdout"
|
||||||
|
- name: Create DB for service on 10.100.100.101
|
||||||
|
mysql_db:
|
||||||
|
login_user: "{{ galera_root_user }}"
|
||||||
|
login_password: "{{ galera_root_password }}"
|
||||||
|
login_host: "10.100.100.101"
|
||||||
|
name: "OSA-test"
|
||||||
|
state: "present"
|
||||||
|
when: ansible_ssh_host == '10.100.100.101'
|
||||||
|
- name: Grant access to the DB on 10.100.100.102
|
||||||
|
mysql_user:
|
||||||
|
login_user: "{{ galera_root_user }}"
|
||||||
|
login_password: "{{ galera_root_password }}"
|
||||||
|
login_host: "10.100.100.102"
|
||||||
|
name: "osa-tester"
|
||||||
|
password: "tester-secrete"
|
||||||
|
host: "{{ item }}"
|
||||||
|
state: "present"
|
||||||
|
priv: "OSA-test.*:ALL"
|
||||||
|
with_items:
|
||||||
|
- "localhost"
|
||||||
|
- "%"
|
||||||
|
when: ansible_ssh_host == '10.100.100.102'
|
||||||
|
vars_files:
|
||||||
|
- test-vars.yml
|
|
@ -0,0 +1,27 @@
|
||||||
|
---
|
||||||
|
# Copyright 2016, Rackspace US, Inc.
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
- name: Install galera server
|
||||||
|
hosts: galera_test_hosts
|
||||||
|
serial: 1
|
||||||
|
user: root
|
||||||
|
gather_facts: true
|
||||||
|
pre_tasks:
|
||||||
|
- debug:
|
||||||
|
msg: "{{ message }}"
|
||||||
|
roles:
|
||||||
|
- role: "{{ rolename | basename }}"
|
||||||
|
vars_files:
|
||||||
|
- test-vars.yml
|
|
@ -13,7 +13,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: Playbook for pre-role upgrade testing
|
- name: Create test containers
|
||||||
hosts: all_containers
|
hosts: all_containers
|
||||||
connection: local
|
connection: local
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
|
@ -51,4 +51,4 @@
|
||||||
port: "{{ ansible_ssh_port | default('22') }}"
|
port: "{{ ansible_ssh_port | default('22') }}"
|
||||||
host: "{{ ansible_ssh_host | default(inventory_hostname) }}"
|
host: "{{ ansible_ssh_host | default(inventory_hostname) }}"
|
||||||
search_regex: OpenSSH
|
search_regex: OpenSSH
|
||||||
delay: 1
|
delay: 1
|
|
@ -13,37 +13,19 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: Playbook for pre-role testing 1of3
|
- name: Perform basic LXC host setup
|
||||||
hosts: 127.0.0.1
|
|
||||||
connection: local
|
|
||||||
become: false
|
|
||||||
pre_tasks:
|
|
||||||
- name: Create ssh key pair for root
|
|
||||||
user:
|
|
||||||
name: "{{ ansible_ssh_user }}"
|
|
||||||
generate_ssh_key: "yes"
|
|
||||||
ssh_key_bits: 2048
|
|
||||||
ssh_key_file: ".ssh/id_rsa"
|
|
||||||
- name: get the calling users key
|
|
||||||
command: cat ~/.ssh/id_rsa.pub
|
|
||||||
register: key_get
|
|
||||||
- set_fact:
|
|
||||||
lxc_container_ssh_key: "{{ key_get.stdout }}"
|
|
||||||
|
|
||||||
- name: Playbook for pre-role testing 2of3
|
|
||||||
hosts: localhost
|
hosts: localhost
|
||||||
connection: local
|
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
- name: First ensure apt cache is always refreshed
|
- name: Ensure apt cache is always refreshed
|
||||||
apt:
|
apt:
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
- name: Ensure root's new public ssh key is in authorized_keys
|
- name: Ensure root's new public ssh key is in authorized_keys
|
||||||
authorized_key:
|
authorized_key:
|
||||||
user: root
|
user: root
|
||||||
key: "{{ hostvars['127.0.0.1']['lxc_container_ssh_key'] }}"
|
key: "{{ hostvars['localhost']['lxc_container_ssh_key'] }}"
|
||||||
manage_dir: no
|
manage_dir: no
|
||||||
- set_fact:
|
- set_fact:
|
||||||
lxc_container_ssh_key: "{{ hostvars['127.0.0.1']['lxc_container_ssh_key'] }}"
|
lxc_container_ssh_key: "{{ hostvars['localhost']['lxc_container_ssh_key'] }}"
|
||||||
- name: Check if this is an OpenStack-CI nodepool instance
|
- name: Check if this is an OpenStack-CI nodepool instance
|
||||||
stat:
|
stat:
|
||||||
path: /etc/nodepool/provider
|
path: /etc/nodepool/provider
|
||||||
|
@ -74,36 +56,3 @@
|
||||||
name: "trusty.tgz"
|
name: "trusty.tgz"
|
||||||
sha256sum: "56c6a6e132ea7d10be2f3e8104f47136ccf408b30e362133f0dc4a0a9adb4d0c"
|
sha256sum: "56c6a6e132ea7d10be2f3e8104f47136ccf408b30e362133f0dc4a0a9adb4d0c"
|
||||||
chroot_path: trusty/rootfs-amd64
|
chroot_path: trusty/rootfs-amd64
|
||||||
post_tasks:
|
|
||||||
# Inventory is being pre-loaded using a post tasks instead of through a dynamic
|
|
||||||
# inventory system. While this is not a usual method for deployment it's being
|
|
||||||
# done for functional testing.
|
|
||||||
- name: Create container hosts
|
|
||||||
add_host:
|
|
||||||
groups: "all,all_containers,galera_test_hosts"
|
|
||||||
hostname: "{{ item.name }}"
|
|
||||||
inventory_hostname: "{{ item.name }}"
|
|
||||||
ansible_ssh_host: "{{ item.address }}"
|
|
||||||
ansible_become: true
|
|
||||||
properties:
|
|
||||||
service_name: "{{ item.service }}"
|
|
||||||
container_networks:
|
|
||||||
management_address:
|
|
||||||
address: "{{ item.address }}"
|
|
||||||
bridge: "lxcbr0"
|
|
||||||
interface: "eth1"
|
|
||||||
netmask: "255.255.255.0"
|
|
||||||
type: "veth"
|
|
||||||
physical_host: localhost
|
|
||||||
container_name: "{{ item.name }}"
|
|
||||||
with_items:
|
|
||||||
- { name: "container1", service: "service1", address: "10.100.100.101" }
|
|
||||||
- { name: "container2", service: "service2", address: "10.100.100.102" }
|
|
||||||
- { name: "container3", service: "service3", address: "10.100.100.103" }
|
|
||||||
|
|
||||||
- name: Playbook for pre-role testing 2of2
|
|
||||||
hosts: localhost
|
|
||||||
connection: local
|
|
||||||
gather_facts: true
|
|
||||||
roles:
|
|
||||||
- role: "openstack_hosts"
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
---
|
||||||
|
# Copyright 2016, Rackspace US, Inc.
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
# NOTE: we use become_user because setting become: no or become: false
|
||||||
|
# doesn't seem to override the ansible_become=true in the
|
||||||
|
# inventory
|
||||||
|
- name: Create ssh key pairs for use with containers
|
||||||
|
hosts: localhost
|
||||||
|
become_user: "{{ ansible_ssh_user }}"
|
||||||
|
tasks:
|
||||||
|
- name: Create ssh key pair for root
|
||||||
|
user:
|
||||||
|
name: "{{ ansible_ssh_user }}"
|
||||||
|
generate_ssh_key: "yes"
|
||||||
|
ssh_key_bits: 2048
|
||||||
|
ssh_key_file: ".ssh/id_rsa"
|
||||||
|
- name: get the calling users key
|
||||||
|
command: cat ~/.ssh/id_rsa.pub
|
||||||
|
register: key_get
|
||||||
|
- set_fact:
|
||||||
|
lxc_container_ssh_key: "{{ key_get.stdout }}"
|
|
@ -0,0 +1,10 @@
|
||||||
|
galera_cluster_members: "{{ groups['galera_test_hosts'] }}"
|
||||||
|
galera_root_password: secrete
|
||||||
|
galera_root_user: root
|
||||||
|
galera_innodb_buffer_pool_size: 512M
|
||||||
|
galera_innodb_log_buffer_size: 32M
|
||||||
|
galera_server_id: "{{ inventory_hostname | string_2_int }}"
|
||||||
|
galera_wsrep_node_name: "{{ inventory_hostname }}"
|
||||||
|
galera_wsrep_provider_options:
|
||||||
|
- { option: "gcache.size", value: "32M" }
|
||||||
|
galera_server_id: "{{ inventory_hostname | string_2_int }}"
|
100
tests/test.yml
100
tests/test.yml
|
@ -13,92 +13,44 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
# Run basic prep
|
# Prepare the user ssh keys
|
||||||
- include: test-prep.yml
|
- include: test-prepare-keys.yml
|
||||||
|
|
||||||
|
# Prepare the host
|
||||||
|
- include: test-prepare-host.yml
|
||||||
|
|
||||||
# Run container clean up and build
|
# Run container clean up and build
|
||||||
- include: test-container-create.yml
|
- include: test-prepare-containers.yml
|
||||||
|
|
||||||
# Deploy the environment
|
# Install Galera server
|
||||||
- name: Playbook for role testing
|
- include: test-install-galera-server.yml
|
||||||
hosts: galera_test_hosts
|
|
||||||
serial: 1
|
|
||||||
user: root
|
|
||||||
gather_facts: true
|
|
||||||
vars:
|
vars:
|
||||||
galera_cluster_members: "{{ groups['galera_test_hosts'] }}"
|
message: "===== Running Current MariaDB Deployment ====="
|
||||||
galera_root_password: secrete
|
|
||||||
galera_root_user: root
|
|
||||||
galera_innodb_buffer_pool_size: 512M
|
|
||||||
galera_innodb_log_buffer_size: 32M
|
|
||||||
galera_server_id: "{{ inventory_hostname | string_2_int }}"
|
|
||||||
galera_wsrep_node_name: "{{ inventory_hostname }}"
|
|
||||||
galera_wsrep_provider_options:
|
|
||||||
- { option: "gcache.size", value: "32M" }
|
|
||||||
roles:
|
|
||||||
- role: "{{ rolename | basename }}"
|
|
||||||
galera_server_id: "{{ inventory_hostname | string_2_int }}"
|
|
||||||
|
|
||||||
# Run playbook test
|
# Run functional tests
|
||||||
- include: test-functional.yml
|
- include: test-galera-server-functional.yml
|
||||||
|
|
||||||
############################# UPGRADE TESTING #############################
|
############################# UPGRADE TESTING #############################
|
||||||
|
|
||||||
# Run container clean up and build
|
# Run container clean up and build
|
||||||
- include: test-container-create.yml
|
- include: test-prepare-containers.yml
|
||||||
|
|
||||||
# Deploy the environment running a 5.5 to 10.0 upgrade
|
# Install previous version of Galera server
|
||||||
- name: Playbook for role upgrade testing
|
- include: test-install-galera-server.yml
|
||||||
hosts: galera_test_hosts
|
|
||||||
serial: 1
|
|
||||||
user: root
|
|
||||||
gather_facts: true
|
|
||||||
vars:
|
vars:
|
||||||
galera_cluster_members: "{{ groups['galera_test_hosts'] }}"
|
message: "===== Running MariaDB 5.5 Deployment for Upgrade ====="
|
||||||
galera_root_password: secrete
|
galera_mariadb_server_package: "mariadb-galera-server-5.5"
|
||||||
galera_root_user: root
|
galera_apt_repo_url: "https://mirror.rackspace.com/mariadb/repo/5.5/ubuntu"
|
||||||
galera_innodb_buffer_pool_size: 512M
|
|
||||||
galera_innodb_log_buffer_size: 32M
|
|
||||||
galera_server_id: "{{ inventory_hostname | string_2_int }}"
|
|
||||||
galera_wsrep_node_name: "{{ inventory_hostname }}"
|
|
||||||
galera_wsrep_provider_options:
|
|
||||||
- { option: "gcache.size", value: "32M" }
|
|
||||||
pre_tasks:
|
|
||||||
- debug:
|
|
||||||
msg: "===== Running MariaDB 5.5 Deployment for Upgrade ====="
|
|
||||||
roles:
|
|
||||||
- role: "{{ rolename | basename }}"
|
|
||||||
galera_mariadb_server_package: "mariadb-galera-server-5.5"
|
|
||||||
galera_apt_repo_url: "https://mirror.rackspace.com/mariadb/repo/5.5/ubuntu"
|
|
||||||
galera_server_id: "{{ inventory_hostname | string_2_int }}"
|
|
||||||
|
|
||||||
# Run initial playbook test
|
# Run initial functional tests
|
||||||
- include: test-functional.yml
|
- include: test-galera-server-functional.yml
|
||||||
|
|
||||||
# Deploy the environment running a 5.5 to 10.0 upgrade
|
# Perform upgrade of Galera server
|
||||||
- name: Playbook for role upgrade testing
|
- include: test-install-galera-server.yml
|
||||||
hosts: galera_test_hosts
|
|
||||||
serial: 1
|
|
||||||
user: root
|
|
||||||
gather_facts: true
|
|
||||||
vars:
|
vars:
|
||||||
galera_cluster_members: "{{ groups['galera_test_hosts'] }}"
|
message: "===== Running MariaDB 5.5 to Current Upgrade ====="
|
||||||
galera_root_password: secrete
|
galera_ignore_cluster_state: true
|
||||||
galera_root_user: root
|
galera_upgrade: true
|
||||||
galera_innodb_buffer_pool_size: 512M
|
|
||||||
galera_innodb_log_buffer_size: 32M
|
|
||||||
galera_server_id: "{{ inventory_hostname | string_2_int }}"
|
|
||||||
galera_wsrep_node_name: "{{ inventory_hostname }}"
|
|
||||||
galera_wsrep_provider_options:
|
|
||||||
- { option: "gcache.size", value: "32M" }
|
|
||||||
pre_tasks:
|
|
||||||
- debug:
|
|
||||||
msg: "===== Running MariaDB 5.5 to current Upgrade ====="
|
|
||||||
roles:
|
|
||||||
- role: "{{ rolename | basename }}"
|
|
||||||
galera_server_id: "{{ inventory_hostname | string_2_int }}"
|
|
||||||
galera_ignore_cluster_state: true
|
|
||||||
galera_upgrade: true
|
|
||||||
|
|
||||||
# Run final playbook test
|
# Run final functional tests
|
||||||
- include: test-functional.yml
|
- include: test-galera-server-functional.yml
|
||||||
|
|
5
tox.ini
5
tox.ini
|
@ -15,6 +15,7 @@ whitelist_externals =
|
||||||
bash
|
bash
|
||||||
git
|
git
|
||||||
rm
|
rm
|
||||||
|
wget
|
||||||
setenv =
|
setenv =
|
||||||
VIRTUAL_ENV={envdir}
|
VIRTUAL_ENV={envdir}
|
||||||
ANSIBLE_HOST_KEY_CHECKING = False
|
ANSIBLE_HOST_KEY_CHECKING = False
|
||||||
|
@ -108,12 +109,16 @@ commands =
|
||||||
rm -rf {homedir}/.ansible
|
rm -rf {homedir}/.ansible
|
||||||
git clone https://git.openstack.org/openstack/openstack-ansible-plugins \
|
git clone https://git.openstack.org/openstack/openstack-ansible-plugins \
|
||||||
{homedir}/.ansible/plugins
|
{homedir}/.ansible/plugins
|
||||||
|
# This plugin makes the ansible-playbook output easier to read
|
||||||
|
wget -O {homedir}/.ansible/plugins/callback/human_log.py \
|
||||||
|
https://gist.githubusercontent.com/cliffano/9868180/raw/f360f306b3c6d689734a6aa8773a00edf16a0054/human_log.py
|
||||||
ansible-galaxy install \
|
ansible-galaxy install \
|
||||||
--role-file={toxinidir}/tests/ansible-role-requirements.yml \
|
--role-file={toxinidir}/tests/ansible-role-requirements.yml \
|
||||||
--ignore-errors \
|
--ignore-errors \
|
||||||
--force
|
--force
|
||||||
ansible-playbook -i {toxinidir}/tests/inventory \
|
ansible-playbook -i {toxinidir}/tests/inventory \
|
||||||
-e "rolename={toxinidir}" \
|
-e "rolename={toxinidir}" \
|
||||||
|
-vv \
|
||||||
{toxinidir}/tests/test.yml
|
{toxinidir}/tests/test.yml
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue