Skip to content
VAP (Vagrant Ansible Programming languages) is Ansible playbooks for website developer and programmer.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

VAP (Vagrant Ansible Programming languages)

VAP (Vagrant Ansible Programming languages) is Ansible playbooks for website developer and programmer.


1. OS Distribution Compatibility

VAP support CentOS, Debian and Ubuntu Boxes.

2. Build Server and Database environment

VAP will build server from Apache or nginx or H2O, and build database from MySQL, MariaDB or Percona MySQL.

On all web servers, FastCGI configuration is possible. Build PHP execution environment from PHP-FPM (FastCGI Process Manager).

By default, the server and the databese is installed in the default settings. Also you can edit configuration files.

3. Build Programming environment

VAP will build a Programming languages that specifies the version.

4. Develop & Deploy Tools

You can install the develop tools or the deploy tools by usage. See Specification for list of installed tools.


Vagrant plugin (optional)


1. Install Virtualbox

Download the VirtualBox form and install.

2. Install Vagrant

Download the Vagrant form and install.

3. Install Vagrant plugin

Install the Vagrant plugin on the terminal as necessary.

vagrant plugin install vagrant-hostsupdater
vagrant plugin install vagrant-vbguest
vagrant plugin install vagrant-serverspec

4. Download Ansible playbooks of VAP

Download a Vagrantfile and Ansible playbooks from the following link.

Download Zip format file

5. Launch a virtual environment

cd vap-x.x.x
vagrant up

If you don't have a Box at first, begins from the download of Box. After provisioning, you can launch a Programming environment.

6. Access to the website

Access to the website http://vap.local/, if the server is running.

Default configuration Variables

ID and password for the initial setting is as follows. Can be set in the provisioning configuration file.


  • ROOT USER root
  • HOST localhost

Customize Options

You can build a variety of environment that edit the configuration file of VAP.

There are two configuration files you can customize.

Run vagrant up or vagrant provision, after editing the configuration file.

Vagrant configuration file (Ruby)

Vagrant configuration file is Vagrantfile.

Vagrantfile will set the vagrant Box, private IP address, hostname and the document root.

If you launch multiple environments, change the name of the directory. you should rewrite vm_ip and vm_hostname. Note not to overlap with other environments.

You can accesse from a terminal in the same LAN to use the public network to Vagrant virtual environment. To use public networks, set IP address for bridged connection to public_ip. In that case, recommended that configure the same IP address to vm_hostname.

You can choose the ansible install mode, the default or the pip.

The default is to install Ansible from the operating system package manager, via yum or apt. The pip is to install Ansible from the Python package manager. In this case, you can install a specific version of Ansible.

## Vagrant Settings ##

vm_box                = 'centos/7'
vm_box_version        = '>= 0'
vm_ip                 = ''
vm_hostname           = 'vap.local'
vm_document_root      = '/var/www/html'

public_ip             = ''

forwarded_port        = []

vbguest_auto_update   = true
synced_folder_type    = 'virtualbox' # virtualbox|nfs|rsync|smb

ansible_install_mode  = :default    # :default|:pip
ansible_version       = 'latest'    # only :pip required
  • vm_box (required) name of Vagrant Box (default: centos/7)
  • vm_box_version (required) version of Vagrant Box (default: >= 0)
  • vm_ip (required) private IP address (default:
  • vm_hostname (required) hostname (default: vap.local)
  • vm_document_root (required) document root path (default: /var/www/html)
    • auto create html directory and synchronized
  • public_ip IP address of bridged connection (default: '')
  • forwarded_port list of ports that you want to transfer (default: [])
  • vbguest_auto_update whether to update VirtualBox Guest Additions (default: true / value: true | false)
  • synced_folder_type the type of synced folder (default: virtualbox / value: virtualbox | nfs | rsync | smb)
  • ansible_install_mode (required) the way to install Ansible (default: :default / value: :default | :pip)
  • ansible_version version of Ansible to install (default: latest)

Provisioning configuration file (YAML)

Provisioning configuration file is group_vars/all.yml.

In YAML format, you can set server, database and Programming environment. And can enable the develop and deploy tools.

## Server & Database Settings ##

server             : none   # none|apache|nginx|h2o
fastcgi            : none   # none|php-fpm
database           : none   # none|mysql|mariadb|percona

db_root_password   : admin

## Programming languages Settings ##
# If the version is set to 0, the programming language does not install

python_version     : 3.6.4       # 3.6.4
ruby_version       : 2.6.1       # 2.6.1
php_version        : 7.3.1       # 7.3.1
perl_version       : 5.26.1      # 5.26.1
node_version       : 10.15.1     # 10.15.1
go_version         : 1.11.5      # 1.11.5
java_version       : 1.8         # 1.8
scala_version      : 2.11.12     # 2.11.12 (require java)

## Develop & Deploy Settings ##

ssl                : true    # true|false
phpmyadmin         : false   # true|false (require PHP and database)

## That's all, stop setting. Let's vagrant up!! ##

Server & Database Settings

  • server (required) name of web server (default: none / value: none | apache | nginx | h2o )
  • fastcgi name of fastCGI (default: none / value: none | php-fpm)
  • database (required) name of databese (default: none / value: none | mysql | mariadb | percona)

Programming languages Settings

  • python_version version of Python (default: 3.6.4)
  • ruby_version version of Ruby (default: 2.6.1)
  • php_version version of PHP (default: 7.3.1)
  • perl_version version of Perl (default: 5.26.1)
  • node_version version of Node.js (default: 10.15.1)
  • go_version version of Go (default: 1.11.5)
  • java_version version of Java (default: 1.8)
  • scala_version version of Scala (default: 2.11.12) require Java

If the version is set to 0, the programming language does not installation

Develop & Deploy Settings

  • ssl activate ssl (default: true / value: true | false)
  • phpmyadmin activate phpMyAdmin (default: false / value: true | false)

Directory Layout

Directory structure of VAP is as follows.

This directory synchronize to the guest OS side /vagrant. html creates automatically and synchronize to vm_document_root.

Full Layout

  • command (stores shell script)
  • config (stores Custom Config)
  • config.sample (sample Custom Config)
  • group_vars (stores the provisioning configuration file of Ansible)
    • all.yml (provisioning configuration file)
  • hosts
    • local (inventory file)
  • html (synchronize to the Document Root. create automatically at vagrant up, if it does not exist.)
  • Rakefile (Rakefile of ServerSpec)
  • roles (stores Ansible playbook of each role)
  • site.yml (Ansible playbook core file)
  • spec (stores ServerSpec spec file)
    • localhost
    • spec_helper.rb
  • Vagrantfile (Vagrant configuration file)

Minimum Layout

VAP will be built in the directory structure of the following minimum unit.

  • group_vars (stores the provisioning configuration file of Ansible)
    • all.yml (provisioning configuration file)
  • html (synchronize to the Document Root. create automatically at vagrant up, if it does not exist.)
  • roles (stores Ansible playbook of each role)
  • site.yml (Ansible playbook core file)
  • Vagrantfile (Vagrant configuration file)

Vagrant Boxs

VAP supports VirtualBox for providers of Vagrant. Operating system supported CentOS, Debian and Ubuntu Boxes. OS architecture supported x86_64. Details are as follows:

  • CentOS 7
  • CentOS 6
  • Debian 9 Stretch
  • Debian 8 Jessie
  • Ubuntu 16.04 Xenial
  • Ubuntu 14.04 Trusty

To download Vagrant Box, you can search from Discover Vagrant Boxes.


Server (Selectable)

FastCGI (Selectable, Only nginx)

  • PHP-FPM (FastCGI Process Manager)

Database (Selectable)

Programming languages

Develop & Deploy Tools (Activatable)


Helper command


Helper command

VAP offers a useful scripts. Just run the script on a terminal. Multiple versions installation of Python, Ruby, PHP and Perl, you can switch the execution environment. will prepare the specified version of Python execution environment.

/vagrant/command/ 3.5.1 will prepare the specified version of Ruby execution environment.

/vagrant/command/ 2.2.0
/vagrant/command/ mruby-1.1.0 will prepare the specified version of PHP execution environment. You can install the specified version of PHP. Switching the PHP version. And then restart Apache or PHP-FPM by switching the server configuration environment.

/vagrant/command/ -v 7.2.1 -m php-fpm -s unix

# help
/vagrant/command/ -h will prepare the specified version of Perl execution environment.

/vagrant/command/ 5.19.11

Custom Config

You can edit the configuration files. When you add tuning configuration files in the directory config, tuning configuration files are placed at provisioning time.

As follows editable configuration files.

  • apache2.000-default.conf.j2
  • apache2.conf.j2
  • apache2.default-ssl.conf.j2
  • apache2.envvars.j2
  • default-node-packages.j2
  • default-ruby-gems.j2
  • h2o.conf.j2
  • httpd.conf.centos6.j2
  • httpd.conf.centos7.j2
  • httpd.www.conf.centos7.j2
  • nginx.conf.j2
  • nginx.www.conf.j2
  • php-build.default_configure_options.j2
  • ssh-config.j2


Patches and Bug Fixes

Small patches and bug reports can be submitted a issue tracker in Github. Forking on Github is another good way. You can send a pull request.

  1. Fork VAP from GitHub repository
  2. Create a feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Create new Pull Request




VAP is distributed under GPLv3.



Copyright (c) 2016-2018 thingsym

You can’t perform that action at this time.