Skip to content

Instantly share code, notes, and snippets.

@jaloren
Created June 18, 2014 22:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaloren/00e3e5a9e3ea9bfdfce9 to your computer and use it in GitHub Desktop.
Save jaloren/00e3e5a9e3ea9bfdfce9 to your computer and use it in GitHub Desktop.
virtdriver:
pkg.installed:
- name: libvirt
file.managed:
- name: /etc/sysconfig/libvirtd
- contents: 'LIBVIRTD_ARGS="--listen"'
- require:
- pkg: virtdriver
libvirt.keys:
- require:
- pkg: lib
service.running:
- name: libvirtd
- require:
- pkg: virtdriver
- network: bridge
- libvirt: libvirt
- watch:
- file: virtdriver
@gravyboat
Copy link

include:
  - whatever_provides_lib_pkg

install_virtdriver:
  pkg.installed:
    - name: libvirt
libvirt_conf:
  file.managed:
    - name: /etc/sysconfig/libvirtd
    - contents: 'LIBVIRTD_ARGS="--listen"'
    - require:
      - pkg: install_virtdriver
libvirt_keys:
  libvirt.keys:
    - require:
      - pkg: lib
libvirtd_service:
  service.running:
    - name: libvirtd
    - require:
      - pkg: install_virtdriver
      - network: bridge
      - libvirt: libvirt_keys
    - watch:
      - file: libvirt_conf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment