summaryrefslogtreecommitdiffstats
path: root/playbooks/openstack/openshift-cluster/tasks
diff options
context:
space:
mode:
authorThomas Wiest <twiest@users.noreply.github.com>2015-07-16 14:00:52 -0400
committerThomas Wiest <twiest@users.noreply.github.com>2015-07-16 14:00:52 -0400
commite0211ca67ce18fc9f74d0a9c82cf14a28f395e4d (patch)
tree1f349f91d3c20baab4b29b7b3207ca29e0801816 /playbooks/openstack/openshift-cluster/tasks
parentadce78d68470b341b761372a70d06b5aec88de06 (diff)
parent4b439253e7b4486947d201714d4f52a4a7e0fc01 (diff)
downloadopenshift-e0211ca67ce18fc9f74d0a9c82cf14a28f395e4d.tar.gz
openshift-e0211ca67ce18fc9f74d0a9c82cf14a28f395e4d.tar.bz2
openshift-e0211ca67ce18fc9f74d0a9c82cf14a28f395e4d.tar.xz
openshift-e0211ca67ce18fc9f74d0a9c82cf14a28f395e4d.zip
Merge pull request #315 from lhuard1A/all_os_in_heat
Make all the OpenStack resources be managed by a Heat Stack
Diffstat (limited to 'playbooks/openstack/openshift-cluster/tasks')
-rw-r--r--playbooks/openstack/openshift-cluster/tasks/launch_instances.yml48
1 files changed, 0 insertions, 48 deletions
diff --git a/playbooks/openstack/openshift-cluster/tasks/launch_instances.yml b/playbooks/openstack/openshift-cluster/tasks/launch_instances.yml
deleted file mode 100644
index 1b9696aac..000000000
--- a/playbooks/openstack/openshift-cluster/tasks/launch_instances.yml
+++ /dev/null
@@ -1,48 +0,0 @@
----
-- name: Get net id
- shell: 'neutron net-show {{ openstack_network_prefix }}-net | awk "/\\<id\\>/ {print \$4}"'
- register: net_id_result
-
-- name: Launch instance(s)
- nova_compute:
- name: '{{ item }}'
- image_name: '{{ deployment_vars[deployment_type].image.name | default(omit, true) }}'
- image_id: '{{ deployment_vars[deployment_type].image.id | default(omit, true) }}'
- flavor_ram: '{{ openstack_flavor[k8s_type].ram | default(omit, true) }}'
- flavor_id: '{{ openstack_flavor[k8s_type].id | default(omit, true) }}'
- flavor_include: '{{ openstack_flavor[k8s_type].include | default(omit, true) }}'
- key_name: '{{ openstack_ssh_keypair }}'
- security_groups: '{{ openstack_network_prefix }}-{{ k8s_type }}-secgrp'
- nics:
- - net-id: '{{ net_id_result.stdout }}'
- user_data: "{{ lookup('file','files/user-data') }}"
- meta:
- env: '{{ cluster }}'
- host-type: '{{ type }}'
- env-host-type: '{{ cluster }}-openshift-{{ type }}'
- floating_ip_pools: '{{ openstack_floating_ip_pools }}'
- with_items: instances
- register: nova_compute_result
-
-- name: Add new instances groups and variables
- add_host:
- hostname: '{{ item.item }}'
- ansible_ssh_host: '{{ item.public_ip }}'
- ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user }}"
- ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}"
- groups: 'tag_env_{{ cluster }}, tag_host-type_{{ type }}, tag_env-host-type_{{ cluster }}-openshift-{{ type }}'
- with_items: nova_compute_result.results
-
-- name: Wait for ssh
- wait_for:
- host: '{{ item.public_ip }}'
- port: 22
- with_items: nova_compute_result.results
-
-- name: Wait for user setup
- command: 'ssh -o StrictHostKeyChecking=no -o PasswordAuthentication=no -o ConnectTimeout=10 -o UserKnownHostsFile=/dev/null {{ hostvars[item.item].ansible_ssh_user }}@{{ item.public_ip }} echo {{ hostvars[item.item].ansible_ssh_user }} user is setup'
- register: result
- until: result.rc == 0
- retries: 30
- delay: 1
- with_items: nova_compute_result.results