Sfoglia il codice sorgente

add disk and network profiles into virt

tags/0.4
smolaon 8 anni fa
parent
commit
a66f7a6a17
2 ha cambiato i file con 31 aggiunte e 1 eliminazioni
  1. +27
    -0
      README.rst
  2. +4
    -1
      salt/control/virt.sls

+ 27
- 0
README.rst Vedi File

@@ -181,3 +181,30 @@ salt-cloud

salt-virt
---------

Sample pillar

.. code-block:: yaml

salt:
control:
enabled: True
virt_enabled: True
size:
medium:
cpu: 2
ram: 1024
cluster:
localnode:
domain: domain.com
engine: virt
config:
engine: salt
host: 127.0.0.1
node:
ubuntu01:
provider: node001.domain.com
image: ubuntu-14-04-x64-1456128611.qcow2
size: medium
disk_profile: database
net_profile: testing

+ 4
- 1
salt/control/virt.sls Vedi File

@@ -32,7 +32,10 @@ salt_control_virt_{{ cluster_name }}_{{ node_name }}:
- mem: {{ size.ram }}
- image: salt://{{ node.image }}
- start: True
- kwargs: {'seed': True }
- disk: {{ node.disk_profile }}
- nic: {{ node.net_profile }}
- kwargs:
seed: True
- unless: virsh list --all | grep {{ node_name }}.{{ cluster.domain }}

#salt_control_seed_{{ cluster_name }}_{{ node_name }}:

Loading…
Annulla
Salva