263 | | - name: Make sure /etc/apache2/sites-available/default file contains "<Location ...> ..." |
264 | | # INSERT COMMAND HERE |
| 263 | - name: Make sure /etc/apache2/sites-available/default contains Location information |
| 264 | lineinfile: |
| 265 | dest: /etc/apache2/sites-available/default |
| 266 | create: yes |
| 267 | state: present |
| 268 | insertafter: EOF |
| 269 | backup: yes |
| 270 | regexp: "{{ item.regexp }}" |
| 271 | line: "{{ item.line }}" |
| 272 | with_items: |
| 273 | - { regexp: '^<Location /server-status>', line: '<Location /server-status>' } |
| 274 | - { regexp: '^ SetHandler server-status', line: ' SetHandler server-status' } |
| 275 | - { regexp: '^ Allow from all', line: ' Allow from all' } |
| 276 | - { regexp: '^</Location>', line: '</Location>' } |