cloud profiles and providers. libvirt net setup

This commit is contained in:
m0duspwnens
2024-08-13 10:17:45 -04:00
parent f9eeb76518
commit aa5de9f7bd
6 changed files with 42 additions and 14 deletions
@@ -49,10 +49,11 @@ sensor:
sls_list:
- setHostname
{%- for hv in HYPERVISORS %}
{%- for node_type, hosts in HYPERVISORS.items() %}
{%- for host in hosts %}
core-{{hv}}:
provider: kvm-ssh-{{hv}}
core-{{host}}:
provider: kvm-ssh-{{host}}
base_domain: jppol9vm
ip_source: qemu-agent
ssh_username: onionuser
@@ -67,4 +68,5 @@ core-{{hv}}:
sls_list:
- setHostname
{%- endfor %}
{%- endfor %}
@@ -3,12 +3,14 @@
# driver: libvirt
# url: qemu+ssh://soqemussh@jpphype1/system?socket=/var/run/libvirt/libvirt-sock
{%- for hv in HYPERVISORS %}
{%- for node_type, hosts in HYPERVISORS.items() %}
{%- for host in hosts %}
kvm-ssh-{{hv}}:
kvm-ssh-{{host}}:
driver: libvirt
url: qemu+ssh://soqemussh@{{hv}}/system?socket=/var/run/libvirt/libvirt-sock
url: qemu+ssh://soqemussh@{{host}}/system?socket=/var/run/libvirt/libvirt-sock
{%- endfor %}
{%- endfor %}
# Or connect to a local libvirt instance
+1 -1
View File
@@ -28,7 +28,7 @@ cloud_profiles:
- name: /etc/salt/cloud.profiles.d/socloud.conf
- source: salt://salt/cloud/cloud.profiles.d/socloud.conf.jinja
- defaults:
HYPERVISORS: {{pillar.hypervisor.nodes}}
HYPERVISORS: {{pillar.hypervisor.nodes.hypervisor}}
- template: jinja
{% else %}