$ brew install ansible
$ brew cask install vagrant
$ brew cask install virtualbox
git clone https://github.com/borderhub/ansible-vagrant-java.git
$ vagrant up
http://192.168.33.10:8080/sample/
If you want to change war file in /www/tomcat/webapps
before
sample-1.0.war
after
yourfilename.war
$ cd /roles/tomcat/tasks
$ vi main.yml
before
name: symbolic link to war file
file: src=/var/www/tomcat/webapps/sample-1.0.war dest=/usr/share/tomcat/webapps/sample.war state=link force=yes
after
name: symbolic link to war file
file: src=/var/www/tomcat/webapps/yourfilename.war dest=/usr/share/tomcat/webapps/sample.war state=link force=yes
$ cd /roles/tomcat/templates
$ vi context.xml
before
<Context path="" docBase="sample" allowLinking="true" debug="0" reloadable="true" crossContext="true">
after
<Context path="" docBase="yourfilename" allowLinking="true" debug="0" reloadable="true" crossContext="true">