https://github.com/voronenko/devops-vagrant-ansible-boilerplate
Boilerplate for deployment projects involving vagrant and ansible
https://github.com/voronenko/devops-vagrant-ansible-boilerplate
ansible boilerplate oops-to-devops vagrant
Last synced: 3 months ago
JSON representation
Boilerplate for deployment projects involving vagrant and ansible
- Host: GitHub
- URL: https://github.com/voronenko/devops-vagrant-ansible-boilerplate
- Owner: Voronenko
- Created: 2019-05-03T15:46:51.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-12-09T13:44:43.000Z (over 6 years ago)
- Last Synced: 2025-04-15T05:38:56.099Z (about 1 year ago)
- Topics: ansible, boilerplate, oops-to-devops, vagrant
- Language: Ruby
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
Vagrant ansible boilerplate
===========================
Boilerplate for project level Vagrant file
Usage - fork/copy, adjust deployment/vagrant/vagrant_config.yml
```
vagrant box list
bento/centos-7.3 (virtualbox, 201708.22.0)
centos/6 (virtualbox, 1811.02)
centos/6 (virtualbox, 1902.01)
centos/7 (virtualbox, 1811.02)
centos/7 (virtualbox, 1902.01)
debian/jessie64 (virtualbox, 8.11.0)
debian/stretch64 (virtualbox, 9.6.0)
debian/wheezy64 (virtualbox, 7.11.2)
generic/fedora28 (virtualbox, 1.8.52)
generic/fedora28 (virtualbox, 1.8.54)
generic/rhel7 (virtualbox, 1.8.52)
littlebigmake (virtualbox, 0)
mwrock/Windows2012R2 (virtualbox, 0.6.1)
mwrock/Windows2016 (virtualbox, 0.3.0)
ubuntu/bionic64 (virtualbox, 20181222.0.0)
ubuntu/bionic64 (virtualbox, 20190503.0.0)
ubuntu/trusty64 (virtualbox, 20181207.0.2)
ubuntu/trusty64 (virtualbox, 20190429.0.0)
ubuntu/xenial64 (virtualbox, 20181223.0.0)
ubuntu/xenial64 (virtualbox, 20190501.0.0)
```
Put your custom provisioning logic into `Vagrantfile.provision`, for example
```
# ================================== CUSTOM PROVISIONING
# https://www.vagrantup.com/docs/provisioning/ansible_common.html
config.vm.provision "ansible" do |ansible|
ansible.playbook = "deployment/provisioners/lamp-box/box_lamp.yml"
ansible.verbose = true
ansible.groups = {
"lamp_box" => [vconfig['vagrant_machine_name']]
}
end
# /================================== CUSTOM PROVISIONING
```
You can also have untracked `Vagrantfile.local` which allows you to locally modify some aspects for the shared project Vagrantfile.
Basing on https://galaxy.ansible.com/softasap roles there are multiple compatible "box provisioners",
which share common approach with both Vagrant and Terraform provisioners, that allow you to reuse the same
code organization for production deployment also.
For terraform part check out https://github.com/Voronenko/devops-terraform-ansible-boilerplate
For managing boxes, you can use repo manager like gilt
```
# https://gilt.readthedocs.io/en/latest/
- git: https://github.com/oops-to-devops/node-box.git
version: master
dst: deployment/provisioners/node-box/
post_commands:
- make
```