provision-openstack.yml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. ---
  2. - hosts: localhost
  3. gather_facts: True
  4. become: False
  5. pre_tasks:
  6. - include: pre_tasks.yml
  7. roles:
  8. - role: openstack-stack
  9. stack_name: "{{ env_id }}.{{ public_dns_domain }}"
  10. dns_domain: "{{ public_dns_domain }}"
  11. dns_nameservers: "{{ public_dns_nameservers }}"
  12. subnet_prefix: "{{ openstack_subnet_prefix }}"
  13. ssh_public_key: "{{ openstack_ssh_public_key }}"
  14. openstack_image: "{{ openstack_default_image_name }}"
  15. lb_flavor: "{{ openstack_default_flavor | default('m1.small') }}"
  16. etcd_flavor: "{{ openstack_default_flavor | default('m1.small') }}"
  17. master_flavor: "{{ openstack_default_flavor | default('m1.medium') }}"
  18. node_flavor: "{{ openstack_default_flavor | default('m1.medium') }}"
  19. infra_flavor: "{{ openstack_default_flavor | default('m1.medium') }}"
  20. dns_flavor: "{{ openstack_default_flavor | default('m1.small') }}"
  21. external_network: "{{ openstack_external_network_name }}"
  22. num_etcd: "{{ openstack_num_etcd | default(0) }}"
  23. num_masters: "{{ openstack_num_masters }}"
  24. num_nodes: "{{ openstack_num_nodes }}"
  25. num_infra: "{{ openstack_num_infra }}"
  26. num_dns: "{{ openstack_num_dns | default(1) }}"
  27. nodes_to_remove: "{{ openstack_nodes_to_remove | default([]) | to_yaml }}"
  28. master_volume_size: "{{ docker_volume_size }}"
  29. app_volume_size: "{{ docker_volume_size }}"
  30. infra_volume_size: "{{ docker_volume_size }}"
  31. - name: Refresh Server inventory
  32. hosts: localhost
  33. connection: local
  34. become: False
  35. gather_facts: False
  36. tasks:
  37. - meta: refresh_inventory
  38. - hosts: cluster_hosts
  39. name: Wait for the the nodes to come up
  40. become: False
  41. gather_facts: False
  42. tasks:
  43. - wait_for_connection:
  44. - hosts: cluster_hosts
  45. gather_facts: True
  46. tasks:
  47. - name: Debug hostvar
  48. debug:
  49. msg: "{{ hostvars[inventory_hostname] }}"
  50. verbosity: 2
  51. - include: post-provision-openstack.yml