Skip to content

Instantly share code, notes, and snippets.

@Jamie-BitFlight
Created October 31, 2017 17:39
Show Gist options
  • Save Jamie-BitFlight/82beebb9cc623d8d9f28edc713236b66 to your computer and use it in GitHub Desktop.
Save Jamie-BitFlight/82beebb9cc623d8d9f28edc713236b66 to your computer and use it in GitHub Desktop.
# File: /srv/salt/apache/init.sls
{% from "apache/map.yaml" import osmap with context %}
# Filter dictionary by grain
{% set apache = salt['grains.filter_by'](osmap) %}
wait_for_refresh:
module.run:
- name: test.sleep
- length: 15
setup_apache:
pkg.installed:
- name: {{ apache.pkg }}
service.running:
- name: {{ apache.srv }}
/var/www/html/:
file.recurse:
- source: salt://web/pretty
- template: jinja
- include_empty: True
- defaults:
back_pic: '../img/bg1.jpg'
web_title: 'Salted APACHE'
cust_name: 'Salty the Cube'
cust_subtitle: 'Get Salted'
cust_image: 'img/team/1.jpg'
- require:
- pkg: {{ apache.pkg }}
- wautch_in:
- service: {{ apache.srv }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment