--- - name: Install Apache mod_evasive apt: pkg: - libapache2-mod-evasive state: present notify: Restart Apache tags: packages - name: Install Apache mod_evasive config template: dest: /etc/apache2/mods-available/evasive.conf src: etc_apache2_mods-available_evasive.conf.j2 mode: 0644 owner: root group: root notify: Reload Apache tags: configs - name: Enable Apache mod_evasive apache2_module: name: evasive state: present force: yes notify: Restart Apache tags: configs