1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/utils/ansible-playbook_integration_runner/main.yml
Chris Meyers 57391f49ba removed ansible_python_interpreter
* added missed renames of ansible_deps to ansible_test_deps
* removed acidential inventory.dynamic file
* modified README for ansible_test_deps role
2015-12-09 07:52:43 -05:00

62 lines
1.7 KiB
YAML

- hosts: all
connection: local
vars:
slaves:
- distribution: "Ubuntu"
version: "12.04"
image: "ami-2ccc7a44"
ssh_user: "ubuntu"
platform: "ubuntu-12.04-x86_64"
- distribution: "Ubuntu"
version: "14.04"
image: "ami-9a562df2"
ssh_user: "ubuntu"
platform: "ubuntu-14.04-x86_64"
- distribution: "CentOS"
version: "6.5"
image: "ami-8997afe0"
ssh_user: "root"
platform: "centos-6.5-x86_64"
- distribution: "CentOS"
version: "7"
image: "ami-96a818fe"
ssh_user: "centos"
platform: "centos-7-x86_64"
tasks:
- debug: var=ansible_version
- include: ec2.yml
when: groups['dynamic_hosts'] is not defined
- hosts: dynamic_hosts
sudo: true
vars:
credentials_file: ''
test_flags: ""
make_target: "non_destructive"
#pre_tasks:
roles:
- { role: ansible_test_deps, tags: ansible_test_deps }
- { role: run_integration,
tags: run_integration,
run_integration_test_flags: "{{ test_flags }}",
run_integration_credentials_file: "{{ credentials_file }}",
run_integration_make_target: "{{ make_target }}", }
tasks:
- name: Kill ec2 instances
sudo: false
local_action:
module: ec2
state: absent
region: 'us-east-1'
instance_ids: "{{ hostvars[item]['ec2_instance_ids'] }}"
when: hostvars[item]['ec2_instance_ids'] is defined and item == inventory_hostname
with_items: groups['dynamic_hosts']
- set_fact:
ansible_connection: local
- name: Fail
shell: 'echo "{{ inventory_hostname }}, Failed" && exit 1'
when: "test_results.rc != 0"