salt.js

An API to control Salt master

Usage no npm install needed!

<script type="module">
  import saltJs from 'https://cdn.skypack.dev/salt.js';
</script>

README

salt.js

A node module to control Saltstack

Example

'use strict';

let Salt    = require('salt.js');
let salt    = new Salt();
yield salt.init('*');
let message = yield salt.cmd('ls');
console.log(message);

Functions

  • .init('device || *')
  • .run('command for minion')
  • .ping // Ping the minion(s) initated*
  • .write(text, path) // Text is what you wish to write to the specific file; Path is the filesystem path*
  • .raw('raw execution command')*