--- - name: Check that Apache is installed urpmi: name=apache state=installed no-recommends=yes tags: httpd - name: Configure Apache log directories file: path=/var/log/httpd/{{ item }} state=directory owner=apache group=apache mode=0755 with_items: - www.mondorescue.org - www.mondorescue.com - www1.mondorescue.org - oldwww.mondorescue.org - mondorescue.hpintelco.org - www.project-builder.org - www1.project-builder.org - pusk.project-builder.org - uuwl.project-builder.org - www.dploy.org - www1.dploy.org - name: Configure Apache template: src={{ item }} dest=/etc/httpd/conf/vhosts.d/{{ item | basename }} owner=root group=root mode=0644 backup=yes with_fileglob: [ 'templates/*.conf' ] notify: - restart httpd tags: httpd - name: Configure Apache logrotate copy: src=files/mondorescue.logrot dest=/etc/logrotate.d/mondorescue owner=root group=root mode=0644 backup=yes tags: httpd - name: Check that Apache is running and enabled service: name=httpd state=started enabled=yes tags: httpd