0

please bear with me; new to salt. i just want to get influxdb deployed and configured automagically with saltstack. i have:

$ cat /srv/salt/influx.sls
influxdb:
  pkg.installed:
    - sources:
      - influxdb: salt://influx/influxdb-0.8.8-1.x86_64.rpm
  service.running:
    - require:
      - pkg: influxdb

and doing a highstate works to get the thing installed.

however, i'm completely at a loss of how to configure influx from salt:

$ sudo salt hosta influxdb.db_create test
hosta:
    'influxdb.db_create' is not available.

can anyone point me in the right direction?

yee379
  • 191
  • 1
  • 5

1 Answers1

0

i was missing the pip module influxdb: add to salt state file:

python-pip:
  pkg.installed

influxdb-python:
  pip.installed:
    - name: influxdb
    - require:
       - pkg: python-pip

influxdb:
  pkg.installed:
    - sources:
      - influxdb: salt://influxdb/influxdb-0.8.8-1.x86_64.rpm
  service.running:
    - require:
      - pkg: influxdb
    - watch:
      - file: /opt/influxdb/current/config.toml
  module.run:
    - name: influxdb.db_create
    - m_name: test_db
yee379
  • 191
  • 1
  • 5