Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

nibbler

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nibbler

Simple npm-based deployment system

Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
29
107.14%
Maintainers
1
Weekly downloads
 
Created
Source

nibbler

A deployment system that's inspired by Ansible, but is modular and harnesses the power of npm.

Installation

npm i nibbler

Usage

The following playbook sets up a host with Redis and io.js present.

var apt = require('nibbler-apt')
var iojs = require('nibbler-debian-iojs')

module.exports = [
  [ apt, {
    updateCache: true,
    state: 'present',
    pkg: ['redis-server']
  } ],
  iojs
]

If you want to run it against your local machine, simply run (given that your playbook file is named playbook.js):

nibbler playbook.js

If you desire to bootstrap a remote host (all actions happen through SSH, so no binaries are required on remote side):

nibbler --runner ssh --ssh root@122.65.21.42 playbook.js

Fancying up

Handling arrays of directives isn't all that Nibbler can do. Underneath, it's all JavaScript, and Nibbler is specifically designed so that dropping down to it is as easy as it gets.

var async = require('async')
var apt = require('nibbler-apt')
var iojs = require('nibbler-debian-iojs')
 
module.exports = function(context, cb) {
  async.parallel([
    async.apply(apt, {
      updateCache: true,
      state: 'present',
      pkg: ['redis-server']
    }, context),
    async.apply(iojs, context)
  ], cb)
}

This example has the added benefit of running all the actions in parallel. You can run it in the same exact way.

FAQs

Package last updated on 20 Apr 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts