-
Notifications
You must be signed in to change notification settings - Fork 33
Add support for changing libvirt socket and pid path #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This allows you to use an uncontainerised libvirtd alongside a containerised instance which has bind mounted /var/run/libvirt into the container.
This stops us having to keep the default in sync with the virt modules.
This was used for testing
This improves readability
Reflects the fact that we are not *just* setting the pid file
The libvirt-bin.service file sources /etc/default/libvirt-bin as an environment file.
future plays require the daemon to be started
README.md
Outdated
`/var/run/{{ libvirt_host_var_prefix }}` if `libvirt_host_var_prefix` is set, | ||
otherwise `""`. | ||
|
||
`libvirt_host_pid_path`: Path to PID file which prevents mulitple instances of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
multiple
vars/Debian.yml
Outdated
insertafter: '^#libvirtd_opts=' | ||
regexp: '^libvirtd_opts=' | ||
line: libvirtd_opts="{{ libvirt_host_libvirtd_args }}" | ||
condition: "{{ libvirt_host_libvirtd_args != '' }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting approach here. Probably more code than two tasks with when RedHat/Debian
, but would extend well to adding further options.
The libvirt-bin package has been removed in modern releases
--- | ||
|
||
- name: Determine path to libvirt environment file | ||
# On Debian >= 8 and Ubuntu >= 16.04 the libvirt-bin package has been |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do have this condition elsewhere, so presumably we could extract it into a variable and set the path based on the variable. This works though.
tasks/config.yml
Outdated
become: True | ||
|
||
- name: Flush handlers | ||
meta: flush_handlers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a chance that we could get here without the daemon running, if none of the above tasks are changed. To be certain, you can add a service/state=started task after flushing handlers.
Has a merge conflict |
As Mark suggested, it is possible that the handlers may not run - libvirt could then be stopped at this point.
This allows you to use an uncontainerised libvirtd alongside
a containerised instance which has bind mounted /var/run/libvirt
into the container.