Skip to content

Instantly share code, notes, and snippets.

@sarasfox
Created July 14, 2015 19:51
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 sarasfox/1f6a130f09223b8a53ae to your computer and use it in GitHub Desktop.
Save sarasfox/1f6a130f09223b8a53ae to your computer and use it in GitHub Desktop.
arangodb.py
# -*- coding: utf-8 -*-
'''
Module for managing Arangodb and Foxx app's
'''
from __future__ import absolute_import
# Import python libs
import logging
# Import salt libs
import salt.utils
log = logging.getLogger(___name___)
def add_app_store(app, mount):
'''
Install a Foxx app form the Foxx app store
'''
cmd = 'foxx-manger install ' + app + ' /' + mount
out = ___salt___['cmd.run'](cmd)
return out
@jquast
Copy link

jquast commented Jul 14, 2015

name this file gg.py in a _modules/ folder, and from a roots/my_app.sls, you would have a state that calls this module function:


my-salt-state:
   gg.add_app_store:
      - app: 'my-app-folder'
      - mount: 'my-app-mount'

or alternatively, with a -name argument:

any-other-name
   gg.add_app_store:
      - name: my-salt-state
      - app: 'my-app-folder'
      - mount: 'my-app-mount'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment