apache-formula/init.sls

47 lines
788 B
Plaintext
Raw Normal View History

2013-07-29 23:29:41 +02:00
include:
2013-07-29 23:30:14 +02:00
- apt
2013-07-29 23:30:29 +02:00
- apache.register_site
2013-07-29 23:29:41 +02:00
{% if grains['os']=="Ubuntu" %}
2013-07-29 23:30:29 +02:00
apache:
2013-07-29 23:29:41 +02:00
pkg.installed:
- name: apache2
- order: 175
service.running:
- enable: True
- order: 455
a2dissite 000-default:
cmd.run:
- order: 225
- onlyif: ls /etc/apache2/sites-enabled/000-default
- watch_in:
2013-07-29 23:30:29 +02:00
- cmd: apache-reload
2013-07-29 23:29:41 +02:00
- require:
2013-07-29 23:30:29 +02:00
- pkg: apache
2013-07-29 23:29:41 +02:00
2013-07-29 23:30:29 +02:00
apache-reload:
2013-07-29 23:29:41 +02:00
cmd.wait:
- name: service apache2 reload
- order: 420
2013-07-29 23:30:29 +02:00
apache-restart:
2013-07-29 23:29:41 +02:00
cmd.wait:
- name: service apache2 restart
- order: 425
/etc/apache2/sites-available/default:
file.absent:
- order: 230
- require:
2013-07-29 23:30:29 +02:00
- pkg: apache
2013-07-29 23:29:41 +02:00
/etc/apache2/sites-available/default-ssl:
file.absent:
- order: 230
- require:
2013-07-29 23:30:29 +02:00
- pkg: apache
2013-07-29 23:29:41 +02:00
{% endif %} #END: os = ubuntu