|
|
@@ -4,7 +4,7 @@ |
|
|
|
salt_control_virt_packages: |
|
|
|
pkg.installed: |
|
|
|
- names: {{ control.virt_pkgs }} |
|
|
|
|
|
|
|
{# |
|
|
|
{%- for package in control.virt_pips %} |
|
|
|
|
|
|
|
{{ package }}: |
|
|
@@ -13,22 +13,27 @@ salt_control_virt_packages: |
|
|
|
- pkg: salt_control_virt_packages |
|
|
|
|
|
|
|
{%- endfor %} |
|
|
|
|
|
|
|
#} |
|
|
|
{%- for cluster_name, cluster in control.cluster.iteritems() %} |
|
|
|
|
|
|
|
{%- if cluster.engine == "virt" %} |
|
|
|
|
|
|
|
{%- for node_name, node in cluster.node.iteritems() %} |
|
|
|
|
|
|
|
{%- if node.provider == grains.id %} |
|
|
|
|
|
|
|
{%- set size = control.size.get(node.size) %} |
|
|
|
|
|
|
|
salt_control_virt_{{ cluster_name }}_{{ node_name }}: |
|
|
|
module.run: |
|
|
|
- name: virt.init |
|
|
|
- m_name: {{ node_name }}_{{ cluster.domain }} |
|
|
|
- m_name: {{ node_name }}.{{ cluster.domain }} |
|
|
|
- cpu: {{ size.cpu }} |
|
|
|
- mem: {{ size.ram }} |
|
|
|
- image: salt://{{ node.image }} |
|
|
|
- unless: virsh list --all | grep {{ node_name }}.{{ cluster.domain }} |
|
|
|
|
|
|
|
{%- endif %} |
|
|
|
|
|
|
|
{%- endfor %} |
|
|
|
|