https://github.com/dalee/ansible.bootstrap
Bootstrap Vagrant machine the first and must role
https://github.com/dalee/ansible.bootstrap
Last synced: about 1 year ago
JSON representation
Bootstrap Vagrant machine the first and must role
- Host: GitHub
- URL: https://github.com/dalee/ansible.bootstrap
- Owner: Dalee
- Created: 2016-07-19T14:13:31.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-12-04T10:20:16.000Z (over 8 years ago)
- Last Synced: 2025-04-10T20:50:47.791Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Vagrant box bootstrapping
Base role for [Dalee/ubuntu](https://atlas.hashicorp.com/Dalee/boxes/ubuntu) Vagrant box.
Role will uninstall some crap (like command-not-found) and
install some mandatory software and some useful commands:
* `pavlik-enable` [Comrade Pavlik](https://github.com/Dalee/comrade-pavlik) helper script
* `docker-cleanup` Docker images/containers cleanup script
* `avahi` daemon to advertise hostname
* `avahi-cname-aliases` [script](https://github.com/Dalee/avahi-cname-aliases) to advertise cname aliases for host via avahi
* `nginx` daemon
* `~/.environment.rc` — loader for role-based environment variables
(make sure to add this file to `.bash_profile`)
## Mandatory parameters
Vagrantfile and ansible provision script should define two variables:
* `project_root` - vagrant path, usually `/home/web/project`
* `project_name` - hostname, will be used for `.local` domain
Vagrantfile example:
```
config.vm.provision "shell", path: "build/ansible.sh",
env: {
"PROJECT_ROOT": "/home/web/project",
"PROJECT_NAME": "sample-project",
}
```
`ansible.sh` example:
```
/usr/bin/ansible-playbook \
-e "project_root"=${PROJECT_ROOT} \
-e "project_name"=${PROJECT_NAME} \
-i "${PROJECT_ROOT}/build/inventory.ini" \
"${PROJECT_ROOT}/build/vagrant.yml"
```