Skip to content

Commit

Permalink
Managee /sumo/sumo.config for install. Renamed installer.sls to
Browse files Browse the repository at this point in the history
install.sls.
  • Loading branch information
Liberty Young committed Aug 26, 2015
1 parent 4c161ea commit 993a54d
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pillar.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## https://service.sumologic.com/help/Using_sumo.conf.htm
#
sumologic_install:
accessid: 'access_id'
accesskey: 'accesskey'
7 changes: 7 additions & 0 deletions sumologic/defaults.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% load_json as rawmap %}
{
"accessid": "access_id",
"accesskey": "access_key",
"sources": "/sumo/sumo.json"
}
{% endload %}
5 changes: 5 additions & 0 deletions sumologic/files/sumo.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{%- from "sumologic/defaults.json" import rawmap with context -%}
{%- set sumoconf = salt['pillar.get']('sumologic_install', rawmap, True) -%}
accessid={{ sumoconf.accessid }}
accesskey={{ sumoconf.accesskey }}
sources={{ sumoconf.sources}}
11 changes: 11 additions & 0 deletions sumologic/installer.sls → sumologic/install.sls
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@
- group: root
- mode: 555

/sumo/sumo.config:
file.managed:
- user: root
- group: root
- mode: 400
- template: jinja
- source: salt://sumologic/files/sumo.config
- requires:
- file: /sumo

sumologic_installer:
file.managed:
- name: /opt/sumo64.sh
Expand All @@ -26,3 +36,4 @@ sumologic_installer:
- requires:
- file: /opt/sumo64.sh
- file: /opt/SumoCollector
- file: /sumo/sumo.config

0 comments on commit 993a54d

Please sign in to comment.