aboutsummaryrefslogtreecommitdiffstats
path: root/tasks/security/mutillidae.yml
blob: 51bac1ffcaae686779e5b44808a13244c0b3351c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# This playbook install the NOWASP (Mutillidae) web penetration test 
# application (http://sourceforge.net/projects/mutillidae/).
#
# Copyright (c) 2013 Fabian Affolter <fabian@affolter-engineering.ch>
#
# All rights reserved. Licensed under CC BY 3.0
#
---
  - name: create the 'webapps' directory
    file: path=/usr/share/webapps/
          owner=root
          group=root
          mode=0777
          state=directory

  - name: downloads the archive
    get_url: url=http://sourceforge.net/projects/mutillidae/files/mutillidae-project/LATEST-mutillidae-$mutillidae_version.zip
             dest=/usr/share/webapps/mutillidae-$mutillidae_version.zip
             mode=0440

  - name: unpack the archive
    command: /usr/bin/unzip -o /usr/share/webapps/mutillidae-$mutillidae_version -d /usr/share/webapps/

  - name: delete the archive
    command: /bin/rm /usr/share/webapps/mutillidae-$mutillidae_version.zip

  - name: set the default mysql password
    command: sed -i 's|MySQLDatabasePassword = ""|MySQLDatabasePassword = "$default_mysql_password"|g' /usr/share/webapps/mutillidae/classes/MySQLHandler.php

  - name: set the right permission
    file: path=/usr/share/webapps/
          mode=0777
          state=directory

  - name: create a symlink to the webserver root
    file: src=/usr/share/webapps/mutillidae/
          dest=/var/www/localhost/htdocs/mutillidae
          owner=root
          group=root
          state=link