This commit is contained in:
m0duspwnens
2024-08-13 13:17:09 -04:00
parent aa5de9f7bd
commit 2a35e45920
4 changed files with 8 additions and 13 deletions

View File

@@ -7,6 +7,7 @@
include:
- libvirt.packages
- libvirt.ssh.users
install_libvirt:
pkg.installed:
@@ -65,6 +66,8 @@ disable_default_bridge:
- name: virsh net-destroy default && virsh net-autostart default --disable
- require:
- pkg: install_libvirt-client
- onlyif:
- virsh net-info | grep default
# this should only run during the first highstate after setup. it will transfer connection from mgmt to br0
down_original_mgmt_interface:

View File

@@ -49,15 +49,14 @@ sensor:
sls_list:
- setHostname
{%- for node_type, hosts in HYPERVISORS.items() %}
{%- for host in hosts %}
{%- for host in HYPERVISORS %}
core-{{host}}:
provider: kvm-ssh-{{host}}
base_domain: jppol9vm
ip_source: qemu-agent
ssh_username: onionuser
private_key: /home/onionuser/.ssh/id_ed25519
ssh_username: soqemussh
private_key: /home/soqemussh/.ssh/id_ed25519
sudo: True
deploy_command: sh /tmp/.saltcloud-*/deploy.sh
script_args: -F -x python3 stable 3006.1
@@ -68,5 +67,4 @@ core-{{host}}:
sls_list:
- setHostname
{%- endfor %}
{%- endfor %}

View File

@@ -1,16 +1,10 @@
# Set up a provider with qemu+ssh protocol
#kvm-ssh-jpphype1:
# driver: libvirt
# url: qemu+ssh://soqemussh@jpphype1/system?socket=/var/run/libvirt/libvirt-sock
{%- for node_type, hosts in HYPERVISORS.items() %}
{%- for host in hosts %}
{%- for host in HYPERVISORS %}
kvm-ssh-{{host}}:
driver: libvirt
url: qemu+ssh://soqemussh@{{host}}/system?socket=/var/run/libvirt/libvirt-sock
{%- endfor %}
{%- endfor %}
# Or connect to a local libvirt instance

View File

@@ -20,7 +20,7 @@ cloud_providers:
- name: /etc/salt/cloud.providers.d/libvirt.conf
- source: salt://salt/cloud/cloud.providers.d/libvirt.conf.jinja
- defaults:
HYPERVISORS: {{pillar.hypervisor.nodes}}
HYPERVISORS: {{pillar.hypervisor.nodes.hypervisor}}
- template: jinja
cloud_profiles: