Skip to content

Commit

Permalink
Updates to readme, repo download, and adding syncSources to user.prop…
Browse files Browse the repository at this point in the history
…erties
  • Loading branch information
Chris Dodds committed Sep 27, 2017
1 parent ed25e67 commit 49a012f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Role Variables

Required:

* sumologic_rpm_url - For some reason Sumo's RPMs are pod-specific, meaning you have to download a different RPM depending on where your pod is hosted. I would recommend downloading the RPM for your [pod's region](https://help.sumologic.com/Send-Data/Installed-Collectors/05Reference-Information-for-Collector-Installation/02Download-a-Collector-from-a-Static-URL) and hosting it in S3 or something similar.
* sumologic_rpm_url - For some reason Sumo's RPMs are pod-specific, meaning you have to download a different RPM depending on where your pod is hosted. Check here for the RPM for your [pod's region](https://help.sumologic.com/Send-Data/Installed-Collectors/05Reference-Information-for-Collector-Installation/02Download-a-Collector-from-a-Static-URL).
* sumologic_access_id - What it says on the tin.
* sumologic_access_key - Same as above.

Expand Down Expand Up @@ -46,7 +46,7 @@ Inside your group_vars env file

---
# env vars
sumologic_rpm_url: 'https://bucketname.s3.aws.amazon.com/sumo_collector.rpm
sumologic_rpm_url: 'https://collectors.us2.sumologic.com/rest/download/rpm/64'
sumologic_access_id: 'XXXXXXXX'
sumologic_access_key: 'XXXXXXX'
sumologic_tracked_logs:
Expand All @@ -64,4 +64,4 @@ MIT
Author Information
------------------

Chris Dodds - @liquid_chickents - chrisdodds.net
Chris Dodds - @liquid_chickens - chrisdodds.net
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# defaults file for sumologic_agent
env_timezone: 'Etc/UTC'
sumologic_tracked_logs: []
sumologic_ephemeral_agent: true
sumologic_ephemeral_agent: true
17 changes: 10 additions & 7 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,33 @@
---
- name: 'Download SumoCollector'
get_url:
url: '{{ sumologic_rpm_url }}'
dest: '/tmp/sumo_collector.rpm'

- name: install sumologic rpm
- name: 'Install SumoCollector redhat'
yum:
name: '{{ sumologic_rpm_url }}'
name: '/tmp/sumo_collector.rpm'
state: present
become: yes

- name: put config file in place
- name: Put config file in place
template:
src: 'templates/user.properties.j2'
dest: '/opt/SumoCollector/config/user.properties'
owner: root
group: sumologic_collector
become: yes

- name: put sources file in place
- name: Put sources file in place
template:
src: 'templates/sources.json.j2'
dest: '/opt/SumoCollector/config/sources.json'
owner: root
group: sumologic_collector
become: yes

- name: start service
- name: Start service
service:
name: collector
state: stopped
state: started
enabled: yes
become: yes
2 changes: 1 addition & 1 deletion templates/user.properties.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ accessid = {{ sumologic_access_id }}
accesskey = {{ sumologic_access_key }}
ephemeral = {{ sumologic_ephemeral_agent }}
targetCPU = 20
sources = /opt/SumoCollector/config/sources.json
syncSources = /opt/SumoCollector/config/sources.json


0 comments on commit 49a012f

Please sign in to comment.