-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* libvirt/clean.sls: call all component cleaning state in a sensible order. * libvirt/server/clean.sls: call all server subcomponent cleaning state in a sensible order. TLS certificates are not handle for now. * libvirt/server/config/clean.sls: remove all configuration files. * libvirt/server/package/clean.sls: remove the libvirt package. The dependencies are not managed. * libvirt/server/service/clean.sls: disable and stop the service. * libvirt/qemu/clean.sls: remove the qemu package. The dependencies are not managed. * libvirt/extra/clean.sls: remove extra packages. The dependencies are not managed. * libvirt/python/clean.sls: remove the libvirt python library if any. The dependencies are not managed.
- Loading branch information
Showing
8 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: ft=sls | ||
|
||
include: | ||
- .extra.clean | ||
- .qemu.clean | ||
- .server.clean | ||
- .python.clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-extra-clean-pkg-removed: | ||
pkg.removed: | ||
- pkgs: {{ libvirt_settings.extra_pkgs|json }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# -*- 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 %} | ||
{%- 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 %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-qemu-clean-pkg-removed: | ||
pkg.removed: | ||
- name: {{ libvirt_settings.qemu_pkg }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: ft=sls | ||
|
||
include: | ||
- .service.clean | ||
- .config.clean | ||
- .package.clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: ft=sls | ||
|
||
{#- Get the `tplroot` from `tpldir` #} | ||
{%- set tplroot = tpldir.split('/')[0] %} | ||
{%- set sls_server_service_clean = tplroot ~ '.server.service.clean' %} | ||
{%- from tplroot ~ "/map.jinja" import libvirt_settings with context %} | ||
include: | ||
- {{ sls_server_service_clean }} | ||
libvirt-server-config-libvirtd-clean-file-absent: | ||
file.absent: | ||
- name: {{ libvirt_settings.libvirtd_config }} | ||
- require: | ||
- sls: {{ sls_server_service_clean }} | ||
libvirt-server-config-daemonconfig-clean-file-absent: | ||
file.absent: | ||
- name: {{ libvirt_settings.daemon_config_path }}/{{ libvirt_settings.libvirt_service }} | ||
- require: | ||
- sls: {{ sls_server_service_clean }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: ft=sls | ||
|
||
{#- Get the `tplroot` from `tpldir` #} | ||
{%- set tplroot = tpldir.split('/')[0] %} | ||
{%- set sls_config_clean = tplroot ~ '.server.config.clean' %} | ||
{%- from tplroot ~ "/map.jinja" import libvirt_settings with context %} | ||
include: | ||
- {{ sls_config_clean }} | ||
libvirt-server-package-clean-pkg-removed: | ||
pkg.removed: | ||
- name: {{ libvirt_settings.libvirt_pkg }} | ||
- require: | ||
- sls: {{ sls_config_clean }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# -*- 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-server-service-clean-service-dead: | ||
service.dead: | ||
- name: {{ libvirt_settings.libvirt_service }} | ||
- enable: False |