Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dmotte/vagrant-ansiblebox
📦 Debian Vagrant box with Ansible and Ansible Lint
https://github.com/dmotte/vagrant-ansiblebox
actions ansible automation base box debian geerlingguy github github-actions pip pip-3 pip3 playbook pypi python python-3 python3 vagrant virtualbox
Last synced: 11 days ago
JSON representation
📦 Debian Vagrant box with Ansible and Ansible Lint
- Host: GitHub
- URL: https://github.com/dmotte/vagrant-ansiblebox
- Owner: dmotte
- License: mit
- Created: 2022-11-01T14:37:35.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-27T10:32:43.000Z (about 2 months ago)
- Last Synced: 2024-10-27T14:32:05.126Z (about 2 months ago)
- Topics: actions, ansible, automation, base, box, debian, geerlingguy, github, github-actions, pip, pip-3, pip3, playbook, pypi, python, python-3, python3, vagrant, virtualbox
- Homepage: https://app.vagrantup.com/dmotte/boxes/ansiblebox
- Size: 20.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vagrant-ansiblebox
[![GitHub main workflow](https://img.shields.io/github/actions/workflow/status/dmotte/vagrant-ansiblebox/main.yml?branch=main&logo=github&label=main&style=flat-square)](https://github.com/dmotte/vagrant-ansiblebox/actions)
[![Vagrant Cloud](https://img.shields.io/badge/vagrant-dmotte/ansiblebox-blue?logo=vagrant&style=flat-square)](https://app.vagrantup.com/dmotte/boxes/ansiblebox):package: **Debian Vagrant box** with **Ansible** and **Ansible Lint** installed via _APT_.
Since Ansible cannot run natively on a _Windows_ host, this Vagrant box can be useful if you need Ansible but you're using Windows on your controller.
> :package: This box is also on **Vagrant Cloud** as [`dmotte/ansiblebox`](https://app.vagrantup.com/dmotte/boxes/ansiblebox).
## Usage
See https://github.com/dmotte/misc/blob/main/examples/vagrant-ansible-provisioner for inspiration on how you could use this box.
If you want your host **SSH identity keys** and **known_hosts** to be available inside the VM, you can mount the host's `~/.ssh` directory like this:
```ruby
config.vm.synced_folder "~/.ssh", "/home/vagrant/.ssh-host",
mount_options: ["dmode=700,fmode=600"]
```Then you'll need to add some directives to the `~/.ssh/config` file inside the VM:
```ruby
config.vm.provision "shell", privileged: false, inline: <<-SHELL
touch ~/.ssh/config; chmod 600 ~/.ssh/config
echo "UserKnownHostsFile ~/.ssh-host/known_hosts" >> ~/.ssh/config
echo -e "Host *\n IdentityFile ~/.ssh-host/id_ed25519" >> ~/.ssh/config
SHELL
```If you want to install additional packages:
```ruby
config.vm.provision "shell", inline: <<-SHELL
apt-get update; apt-get install -y rsync
SHELL
```