Skip to content

Instantly share code, notes, and snippets.

@buddyp450
Created February 24, 2016 03:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save buddyp450/1cefa48fd5d1e47b103c to your computer and use it in GitHub Desktop.
Save buddyp450/1cefa48fd5d1e47b103c to your computer and use it in GitHub Desktop.
Attempting to require that jre-headless be installed in either the logstash package or the opentsdb service.
salt-call state.apply java
=> results in logstash being installed per it's init.sls!
=> EXPECTED: java default-jre-headless package to be installed since I'm on Ubuntu
also...
salt-call state.apply opentsdb
=> EXPECTED: for opentsdb to know that it has to have default-jre-headless in order to finish it's service.running state
=> instead, pkg.installed is invoked and service.running fails
include:
- logstash
- opentsdb
{% if grains.os == 'Windows' %}
java:
pkg:
- installed
- require_in:
- pkg: logstash
{% elif grains.get('lsb_distrib_id') == 'Ubuntu' %}
java:
pkg.installed:
- name: default-jre-headless
- require_in:
- pkg: logstash
- service: opentsdb
{% endif %}
opentsdb:
pkg.installed:
- sources:
- opentsdb: https://github.com/OpenTSDB/opentsdb/releases/download/v2.2.0/opentsdb-2.2.0_all.deb
service.running:
- enable: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment