162 | | - name: Configure client |
163 | | hosts: client |
164 | | sudo: True |
165 | | tasks: |
166 | | - name: install apache2 |
167 | | apt: name=apache2 update_cache=yes |
168 | | - name: install iperf |
169 | | apt: name=iperf update_cache=yes |
170 | | - name: copy scripts into /local with permissions 755 |
171 | | synchronize: src=scripts dest=/local mode=755 |
| 162 | - name: map network using nmap |
| 163 | command: nmap -sP -oX {{ nmap_xml_file }} {{ address_range }} |
| 164 | - name: convert nmap xml to html |
| 165 | shell: xsltproc /usr/share/nmap/nmap.xsl {{ nmap_xml_file }} > {{ nmap_html_file }} |
| 166 | - name: create directory for nmap logs in WEB_ROOT/nmaplogs with permissions of 755 |
| 167 | file: > |
| 168 | dest={{ WEB_ROOT }}/{{ nmap_dir }} |
| 169 | state=directory |
| 170 | mode=755 |
| 171 | - name: copy nmap html file to a public place |
| 172 | command: mv {{ nmap_html_file }} {{ WEB_ROOT }}/{{ nmap_dir }}/nmap.html removes={{ nmap_html_file }} |
| 173 | [ |