Skip to content

Commit

Permalink
BREAKING CHANGE: update for onedir salt package
Browse files Browse the repository at this point in the history
  • Loading branch information
didiermfb committed Jan 31, 2024
1 parent 3dc21ce commit 07a6e46
Show file tree
Hide file tree
Showing 15 changed files with 17 additions and 154 deletions.
3 changes: 1 addition & 2 deletions libvirt/parameters/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ values:
- id
libvirt_pkg: libvirt
qemu_pkg: qemu
python2_pkg: libvirt-python
python3_pkg: python3-libvirt
pip_pkg: libvirt-python
libvirt_service: libvirtd
libvirtd_config: /etc/libvirt/libvirtd.conf
daemon_config_path: {}
Expand Down
14 changes: 0 additions & 14 deletions libvirt/parameters/os/AlmaLinux.yaml

This file was deleted.

14 changes: 0 additions & 14 deletions libvirt/parameters/os/CentOS.yaml

This file was deleted.

14 changes: 0 additions & 14 deletions libvirt/parameters/os/Fedora.yaml

This file was deleted.

14 changes: 0 additions & 14 deletions libvirt/parameters/os/Rocky.yaml

This file was deleted.

3 changes: 2 additions & 1 deletion libvirt/parameters/os_family/Arch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
values:
daemon_config_path: /etc/conf.d
qemu_pkg: qemu-full
python3_pkg: libvirt-python
extra_pkgs:
- pkgconf
...
3 changes: 2 additions & 1 deletion libvirt/parameters/os_family/Debian.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ values:
libvirt_pkg: libvirt-daemon-system
libvirt_service: libvirtd
qemu_pkg: qemu-system-x86
python2_pkg: python-libvirt
extra_pkgs:
- libguestfs0
- libguestfs-tools
- gnutls-bin
- libvirt-dev
- pkg-config
daemon_config_path: /etc/default
...
2 changes: 2 additions & 0 deletions libvirt/parameters/os_family/RedHat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@ values:
qemu_pkg: qemu-kvm
extra_pkgs:
- libguestfs
- libvirt-devel
- pkgconf
daemon_config_path: /etc/sysconfig
...
4 changes: 2 additions & 2 deletions libvirt/parameters/os_family/Suse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ values:
qemu_pkg: qemu-kvm
extra_pkgs:
- libguestfs0
python2_pkg: python2-libvirt-python
python3_pkg: python3-libvirt-python
- libvirt-devel
- pkg-config
daemon_config_path: /etc/sysconfig
...
16 changes: 0 additions & 16 deletions libvirt/parameters/oscodename/openSUSE Tumbleweed.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions libvirt/parameters/osfinger/CentOS Linux-7.yaml

This file was deleted.

34 changes: 0 additions & 34 deletions libvirt/python.jinja

This file was deleted.

10 changes: 2 additions & 8 deletions libvirt/python/clean.sls
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@
{#- Get the `tplroot` from `tpldir` #}
{%- set tplroot = tpldir.split('/')[0] %}
{%- from tplroot ~ "/map.jinja" import mapdata as libvirt_settings with context %}
{%- from tplroot ~ "/python.jinja" import switch_python32 with context %}
{%- set package = switch_python32(libvirt_settings.python3_pkg, libvirt_settings.python2_pkg) %}
{#- Some OS do not have the python3 library #}
{%- if package %}
libvirt-python-clean-pkg-removed:
pkg.removed:
- name: {{ package }}
{%- endif %}
pip.uninstalled:
- name: {{ libvirt_settings.pip_pkg }}
13 changes: 5 additions & 8 deletions libvirt/python/install.sls
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,10 @@
{#- Get the `tplroot` from `tpldir` #}
{%- set tplroot = tpldir.split('/')[0] %}
{%- from tplroot ~ "/map.jinja" import mapdata as libvirt_settings with context %}
{%- from tplroot ~ "/python.jinja" import switch_python32 with context %}
{%- set package = switch_python32(libvirt_settings.python3_pkg, libvirt_settings.python2_pkg) %}
{#- Some OS do not have the python3 library #}
{%- if package %}
libvirt-python-install-pkg-installed:
pkg.installed:
- name: {{ package }}
{%- endif %}
pip.installed:
- name: {{ libvirt_settings.pip_pkg }}
- require:
- pkg: libvirt-extra-install-pkg-installed
12 changes: 1 addition & 11 deletions libvirt/server/tls/certs.sls
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,16 @@
{%- set sls_python = tplroot ~ '.python' %}
{%- set sls_server_config = tplroot ~ '.server.config' %}
{%- from tplroot ~ "/map.jinja" import mapdata as libvirt_settings with context %}
{%- from tplroot ~ "/python.jinja" import switch_python32 with context %}
{%- set package = switch_python32(libvirt_settings.python3_pkg, libvirt_settings.python2_pkg) %}
{%- set salt_version = salt['grains.get']('saltversioninfo', '') %}
{#- Some OS do not have the python3 library #}
{%- if package %}
include:
- {{ sls_python }}
- {{ sls_server_config }}
libvirt-server-tls-certs-virt-keys:
# API changes with version 2016.3.0
{%- if salt_version[0]|int < 2016 or (salt_version[0]|int == 2016 and salt_version[1]|int <= 3) %}
libvirt.keys:
{%- else %}
virt.keys:
{%- endif %}
- name: libvirt_keys
- require:
- pkg: libvirt-server-package-install-pkg-installed
- pkg: libvirt-python-install-pkg-installed
{%- endif %}
- pip: {{ libvirt_settings.pip_pkg }}

0 comments on commit 07a6e46

Please sign in to comment.