blob: dc6e04733085af0001e63e5010185c196c148d49 [file] [log] [blame]
Jakub Pavlik1af183b2015-02-22 18:25:28 +01001{% from "libvirt/map.jinja" import server with context %}
2
3{%- if server.enabled %}
4
5libvirt_packages:
6 pkg.installed:
7 - names: {{ server.pkgs }}
8
9libvirtd_config:
10 file.managed:
11 - name: {{ server.config }}
12 - source: salt://libvirt/files/libvirtd.conf.{{ grains.os_family }}
13 - template: jinja
14 - require:
15 - pkg: libvirt_packages
16
17libvirt_sysconfig:
18 file.append:
19 - name: {{ server.config_sys }}
20 - text: 'LIBVIRTD_ARGS="--listen"'
21 - require:
22 - pkg: libvirt_packages
23
24libvirt_service:
25 service.running:
26 - name: {{ server.service }}
27 - enable: true
28 - reload: true
29 - watch:
30 - file: libvirt_config
31
32{%- endif %}