Pārlūkot izejas kodu

Virtng module

tags/0.4
Ales Komarek pirms 8 gadiem
vecāks
revīzija
05e3c33bdf
3 mainītis faili ar 10 papildinājumiem un 4 dzēšanām
  1. +0
    -0
      _modules/virtng.py
  2. +1
    -1
      salt/control/virt.sls
  3. +9
    -3
      salt/files/_virt.conf

_modules/virt_ng.py → _modules/virtng.py Parādīt failu


+ 1
- 1
salt/control/virt.sls Parādīt failu

@@ -42,7 +42,7 @@ salt_control_virt_packages:

salt_control_virt_{{ cluster_name }}_{{ node_name }}:
module.run:
- name: virt.init
- name: virtng.init
- m_name: {{ node_name }}.{{ cluster.domain }}
- cpu: {{ size.cpu }}
- mem: {{ size.ram }}

+ 9
- 3
salt/files/_virt.conf Parādīt failu

@@ -1,8 +1,10 @@
{% from "salt/map.jinja" import control with context %}

{%- if control.net_profile is defined or control.disk_profile is defined %}
virt:
{%- if control.net_profile is defined %}
nic:
{%- for item_name, item in control.get('net_profile', {}).iteritems() %}
{%- for item_name, item in control.net_profile.iteritems() %}
{{ item_name }}:
{%- for iface_name, iface in item.iteritems() %}
{{ iface_name }}:
@@ -17,8 +19,10 @@ virt:
{%- endif %}
{%- endfor %}
{%- endfor %}
{%- endif %}
{%- if control.disk_profile is defined %}
disk:
{%- for item_name, item in control.get('disk_profile', {}).iteritems() %}
{%- for item_name, item in control.disk_profile.iteritems() %}
{{ item_name }}:
{%- for disk_name, disk in item.iteritems() %}
- {{ disk }}:
@@ -27,5 +31,7 @@ virt:
{%- endif %}
{%- endfor %}
{%- endfor %}
{%- endif %}
{%- endif %}

virt.images: /var/lib/libvirt/images
virt.images: /var/lib/libvirt/images

Notiek ielāde…
Atcelt
Saglabāt