Skip to main content

A CLI front-end to a running salt-api system

Project description

https://img.shields.io/pypi/v/salt-pepper.svg https://travis-ci.com/saltstack/pepper.svg?branch=develop https://img.shields.io/pypi/pyversions/salt-pepper.svg https://img.shields.io/badge/license-Apache2-blue.svg?maxAge=3600 https://codecov.io/gh/saltstack/pepper/branch/develop/graph/badge.svg

Pepper contains a Python library and CLI scripts for accessing a remote salt-api instance.

pepperlib abstracts the HTTP calls to salt-api so existing Python projects can easily integrate with a remote Salt installation just by instantiating a class.

The pepper CLI script allows users to execute Salt commands from computers that are external to computers running the salt-master or salt-minion daemons as though they were running Salt locally. The long-term goal is to add additional CLI scripts maintain the same interface as Salt’s own CLI scripts (salt, salt-run, salt-key, etc).

It does not require any additional dependencies and runs on Python 2.5+ and Python 3. (Python 3 support is new, please file an issue if you encounter trouble.)

Installation

pip install salt-pepper

Usage

Basic usage is in heavy flux.

export SALTAPI_USER=saltdev SALTAPI_PASS=saltdev SALTAPI_EAUTH=pam
pepper '*' test.ping
pepper '*' test.kwarg hello=dolly

Examples leveraging the runner client.

pepper --client runner reactor.list
pepper --client runner reactor.add event='test/provision/*' reactors='/srv/salt/state/reactor/test-provision.sls'

Configuration

You can configure pepper through the command line, using environment variables or in a configuration file $HOME/.pepperrc with the following syntax :

[main]
SALTAPI_URL=https://localhost:8000/
SALTAPI_USER=saltdev
SALTAPI_PASS=saltdev
SALTAPI_EAUTH=pam

Contributing

Please feel free to get involved by sending pull requests or join us on the Salt mailing list or on IRC in #salt or #salt-devel.

This repo follows the same contributing guidelines as Salt and uses separate develop and master branches for in-progress additions and bug-fix changes respectively.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for salt-pepper, version 0.7.5
Filename, size File type Python version Upload date Hashes
Filename, size salt_pepper-0.7.5-py2-none-any.whl (14.9 kB) File type Wheel Python version 2.7 Upload date Hashes View hashes
Filename, size salt_pepper-0.7.5-py3-none-any.whl (14.9 kB) File type Wheel Python version 3.7 Upload date Hashes View hashes
Filename, size salt-pepper-0.7.5.tar.gz (21.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page