mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-19 14:57:43 -02:30
Add complete test integration
This commit is contained in:
33
tests/cloud_playbooks/create-aws.yml
Normal file
33
tests/cloud_playbooks/create-aws.yml
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
sudo: False
|
||||
gather_facts: False
|
||||
|
||||
tasks:
|
||||
- name: Provision a set of instances
|
||||
ec2:
|
||||
key_name: "{{ aws.key_name }}"
|
||||
aws_access_key: "{{ aws.access_key }}"
|
||||
aws_secret_key: "{{ aws.secret_key }}"
|
||||
region: "{{ aws.region }}"
|
||||
group_id: "{{ aws.group}}"
|
||||
instance_type: "{{ aws.instance_type}}"
|
||||
image: "{{ aws.ami_id }}"
|
||||
wait: true
|
||||
count: "{{ aws.count }}"
|
||||
instance_tags: "{{ aws.tags }}"
|
||||
register: ec2
|
||||
|
||||
- name: Template the inventory
|
||||
template:
|
||||
src: templates/inventory.ini.j2
|
||||
dest: "{{ inventory_path }}"
|
||||
|
||||
- name: Wait until SSH is available
|
||||
local_action:
|
||||
module: wait_for
|
||||
host: "{{ item.public_ip }}"
|
||||
port: 22
|
||||
timeout: 300
|
||||
state: started
|
||||
with_items: ec2.instances
|
||||
Reference in New Issue
Block a user