-
-
Save Nothing4You/caa7c3df05ff701deeaf0ee0818aa62d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: "Apache: Check if other-vhosts-access-log is enabled" | |
stat: | |
path: "/etc/apache2/conf-enabled/other-vhosts-access-log.conf" | |
register: check_other_vhosts_access_log | |
- name: "Apache: Disable other-vhosts-access-log" | |
command: a2disconf other-vhosts-access-log | |
when: check_other_vhosts_access_log.stat.exists | |
notify: restart apache service | |
- name: "Apache: Install apache custom configuration" | |
template: | |
src: 'apache2-custom.j2' | |
dest: "/etc/apache2/conf-available/custom.conf" | |
mode: 0644 | |
notify: restart apache service | |
- name: "Apache: Check if custom configuration is enabled" | |
stat: | |
path: "/etc/apache2/conf-enabled/custom.conf" | |
register: check_custom_conf | |
- name: "Apache: Enable custom configuration" | |
command: a2enconf custom | |
when: check_custom_conf.stat.exists == False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment