diff --git a/apache/init.sls b/apache/init.sls new file mode 100644 index 0000000..d487029 --- /dev/null +++ b/apache/init.sls @@ -0,0 +1,17 @@ +install_apache: + pkg.installed: + - pkgs: + - apache2 + +index_html: + file.managaed: + - name: /var/www/html/index.html + - user: www-data + - group: www-data + - mode: 644 + - source: salt://apache/templates/index.html + + apache_service: + service.running: + - name: apache2 + - enable: True diff --git a/apache/templates/index.html b/apache/templates/index.html new file mode 100644 index 0000000..b9c05a3 --- /dev/null +++ b/apache/templates/index.html @@ -0,0 +1 @@ +Hello from salt! diff --git a/top.sls b/top.sls new file mode 100644 index 0000000..fd097e6 --- /dev/null +++ b/top.sls @@ -0,0 +1,5 @@ +'*': + +'minion*': + - apache + - users