Pārlūkot izejas kodu

Merge pull request #27 from smolaon/master

added autostart for vm into virt
pull/35/head
Aleš Komárek pirms 7 gadiem
vecāks
revīzija
f6128e77c5
2 mainītis faili ar 14 papildinājumiem un 0 dzēšanām
  1. +11
    -0
      salt/control/virt.sls
  2. +3
    -0
      salt/map.jinja

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

@@ -69,6 +69,17 @@ salt_control_virt_{{ cluster_name }}_{{ node_name }}:
# - path: /srv/salt-images/{{ node_name }}.{{ cluster.domain }}/system.qcow2
# - id_: {{ node_name }}.{{ cluster.domain }}
# - unless: virsh list | grep {{ node_name }}.{{ cluster.domain }}

{%- if node.get("autostart", True) %}

salt_virt_autostart_{{ cluster_name }}_{{ node_name }}:
module.run:
- name: virt.set_autostart
- vm_: {{ node_name }}.{{ cluster.domain }}
- state: true
- unless: virsh list --autostart | grep {{ node_name }}.{{ cluster.domain }}
{%- endif %}
{%- endif %}


+ 3
- 0
salt/map.jinja Parādīt failu

@@ -142,7 +142,10 @@ Debian:
virt_pkgs:
- libvirt-dev
- pkg-config
{% if grains.oscodename == 'trusty' %}
- libguestfs-tools
{% endif %}

RedHat:
virt_pkgs:
- libvirt-dev

Notiek ielāde…
Atcelt
Saglabāt