Skip to content

Commit

Permalink
feat(packages): dispatch package installation per component
Browse files Browse the repository at this point in the history
* libvirt/server/init.sls: include “libvirt.server.package” SLS.

* libvirt/server/package/init.sls: include
  “libvirt.server.package.install” SLS.

* libvirt/server/package/install.sls: use “tplroot” to resolve import.
  Install the libvirt package.

* libvirt/qemu/init.sls: include “libvirt.qemu.install” SLS.

* libvirt/qemu/install.sls: use “tplroot” to resolve import.  Install
  the qemu package.

* libvirt/extra/init.sls: include “libvirt.extra.install” SLS.

* libvirt/extra/install.sls: use “tplroot” to resolve import.  Install
  the extra packages.

BREAKING CHANGE: libvirt package is installed by libvirt.server.package.install
BREAKING CHANGE: qemu package is installed by libvirt.qemu.install
BREAKING CHANGE: extra packages are installed by libvirt.extra.install
  • Loading branch information
baby-gnu committed Aug 28, 2019
1 parent 886198b commit f9e587d
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 13 deletions.
5 changes: 5 additions & 0 deletions libvirt/extra/init.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# vim: ft=sls

include:
- .install
10 changes: 10 additions & 0 deletions libvirt/extra/install.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
# vim: ft=sls

{#- Get the `tplroot` from `tpldir` #}
{%- set tplroot = tpldir.split('/')[0] %}
{%- from tplroot ~ "/map.jinja" import libvirt_settings with context %}
extra_pkgs:
pkg.installed:
- pkgs: {{ libvirt_settings.extra_pkgs|json }}
13 changes: 0 additions & 13 deletions libvirt/install.sls

This file was deleted.

5 changes: 5 additions & 0 deletions libvirt/qemu/init.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# vim: ft=sls

include:
- .install
10 changes: 10 additions & 0 deletions libvirt/qemu/install.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
# vim: ft=sls

{#- Get the `tplroot` from `tpldir` #}
{%- set tplroot = tpldir.split('/')[0] %}
{%- from tplroot ~ "/map.jinja" import libvirt_settings with context %}
qemu:
pkg.installed:
- name: {{ libvirt_settings.qemu_pkg }}
5 changes: 5 additions & 0 deletions libvirt/server/init.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# vim: ft=sls

include:
- .package
5 changes: 5 additions & 0 deletions libvirt/server/package/init.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# vim: ft=sls

include:
- .install
10 changes: 10 additions & 0 deletions libvirt/server/package/install.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
# vim: ft=sls

{#- Get the `tplroot` from `tpldir` #}
{%- set tplroot = tpldir.split('/')[0] %}
{%- from tplroot ~ "/map.jinja" import libvirt_settings with context %}
libvirt.pkg:
pkg.installed:
- name: {{ libvirt_settings.libvirt_pkg }}

0 comments on commit f9e587d

Please sign in to comment.