You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
990 B
32 lines
990 B
---
|
|
- name: copy the webapp
|
|
copy: src=ansible-facts-webapp.tgz dest=/opt/
|
|
|
|
- name: download the play framework
|
|
get_url: url=http://downloads.typesafe.com/play/2.1.1/play-2.1.1.zip dest=/opt/play-2.1.1.zip
|
|
|
|
- name: extract the play framework
|
|
command: chdir=/opt/ unzip play-2.1.1.zip
|
|
creates=/opt/play-2.1.1
|
|
|
|
- name: symlink for convenience
|
|
file: src=/opt/play-2.1.1 path=/opt/play state=link
|
|
|
|
- name: extract the webapp folder
|
|
command: chdir=/opt/ tar -xvzf ansible-facts-webapp.tgz
|
|
creates=/opt/webapp
|
|
|
|
- name: Build and compile the webapp
|
|
shell: chdir=/opt/webapp export PATH=$PATH:/opt/play-2.1.1/; play clean compile stage
|
|
creates=/opt/webapp/target
|
|
notify: restart play
|
|
|
|
- name: Copy the ansible hosts file
|
|
copy: src=hosts dest=/etc/ansible/hosts
|
|
|
|
- name: Copy the webapp startup file
|
|
copy: src=play.initscript dest=/etc/init.d/play mode=0755
|
|
notify: restart play
|
|
|
|
- name: Start Play
|
|
service: name=play state=started enabled=yes
|
|
|