From 91286fe73c3bb4da244f5d996acdde71badadef9 Mon Sep 17 00:00:00 2001 From: Jesse Harris Date: Thu, 28 Jan 2021 15:17:01 +1000 Subject: [PATCH] added apache state test files --- apache/init.sls | 17 +++++++++++++++++ apache/templates/index.html | 1 + top.sls | 5 +++++ 3 files changed, 23 insertions(+) create mode 100644 apache/init.sls create mode 100644 apache/templates/index.html create mode 100644 top.sls 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