Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/madic-creates/vagrant-libvirt-ansible
Based upon the vagrant libvirt container with added ansible
https://github.com/madic-creates/vagrant-libvirt-ansible
ansible ansible-playbook libvirt libvirtd vagrant
Last synced: 29 days ago
JSON representation
Based upon the vagrant libvirt container with added ansible
- Host: GitHub
- URL: https://github.com/madic-creates/vagrant-libvirt-ansible
- Owner: madic-creates
- License: other
- Created: 2024-11-28T11:32:09.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-11-28T14:16:56.000Z (30 days ago)
- Last Synced: 2024-11-28T14:32:55.626Z (30 days ago)
- Topics: ansible, ansible-playbook, libvirt, libvirtd, vagrant
- Language: Dockerfile
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vagrant-libvirt-ansible
This container builds upon the [vagrant-libvirt](https://github.com/vagrant-libvirt/vagrant-libvirt) slim container by adding Ansible as provisioner.
You can use this as a direct replacement for the [official vagrant-libvirt container](https://vagrant-libvirt.github.io/vagrant-libvirt/installation.html#docker--podman).
I prefer to use the vagrant-libvirt container because my preferred desktop OS, Arch Linux, offers newer package versions, which are incompatible with the vagrant-libvirt requirements.
However, the default container does not include Ansible, which I need to provision virtual machines, particularly for testing my [k3s-git-ops project](https://github.com/madic-creates/k3s-git-ops).
## Pull the Container
```shell
docker pull ghcr.io/madic-creates/vagrant-libvirt-ansible:latest
```## Create an Alias
To use the container as the standard `vagrant` command, add the following function to your bash/zsh configuration:
```shell
function vagrant() {
docker run -it --rm \
-e LIBVIRT_DEFAULT_URI \
-v /var/run/libvirt/:/var/run/libvirt/ \
-v ~/.vagrant.d:/.vagrant.d \
-v $(realpath "${PWD}"):${PWD} \
-w "${PWD}" \
--network host \
ghcr.io/madic-creates/vagrant-libvirt-ansible:latest \
vagrant $@
}
```## Build the Container Manually
```shell
docker build -f Containerfile .
```