# This playbook install the Damn Vulnerable Web Application (DVWA) # (http://www.dvwa.co.uk/). # # Copyright (c) 2013 Fabian Affolter # # Licensed under CC BY 3.0. All rights reserved. # --- - name: downloads the archive get_url: url=http://dvwa.googlecode.com/files/DVWA-$dvwa_version.zip dest=/usr/share/webapps/dvwa-$dvwa_version.zip mode=0440 - name: unpack the archive command: /usr/bin/unzip -o /usr/share/webapps/dvwa-$dvwa_version.zip -d /usr/share/webapps/ - name: delete the archive command: /bin/rm /usr/share/webapps/dvwa-$dvwa_version.zip - name: set the permissions file: path=/usr/share/webapps/ mode=0777 state=directory - name: install a default configuration file template: src=files/dvwa.j2 dest=/usr/share/webapps/dvwa/config/config.inc.php owner=root group=root mode=0755 backup=yes - name: create a symlink to the webserver root file: src=/usr/share/webapps/dvwa/ dest=/var/www/localhost/htdocs/dvwa owner=root group=root state=link