blob: 66b3e219279186af7be75dbe040ebd6747b09fe3 [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:
Jakub Pavlik4c68b142015-02-22 18:54:05 +010030 - file: libvirtd_config
Jakub Pavlik1af183b2015-02-22 18:25:28 +010031
32{%- endif %}