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. You can run pepper using the script in %PYTHONHOME%/scripts/pepper (a pepper.cmd wrapper is provided for convenience to Windows users).

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.

Source Distribution

salt-pepper-0.7.6.tar.gz (23.9 kB view details)

Uploaded Source

Built Distribution

salt_pepper-0.7.6-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file salt-pepper-0.7.6.tar.gz.

File metadata

  • Download URL: salt-pepper-0.7.6.tar.gz
  • Upload date:
  • Size: 23.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for salt-pepper-0.7.6.tar.gz
Algorithm Hash digest
SHA256 b75a641d4fd96663ae44fc7ce4aadb7e4c87b8ff30f7ac35479a282b99894749
MD5 0dbc09d791d9c2500b873398522483e4
BLAKE2b-256 5ae02aa7893ccd711fbb197e1b96038c47db9d903604e023a436521780775d5b

See more details on using hashes here.

File details

Details for the file salt_pepper-0.7.6-py3-none-any.whl.

File metadata

  • Download URL: salt_pepper-0.7.6-py3-none-any.whl
  • Upload date:
  • Size: 15.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.2.0 requests-toolbelt/0.8.0 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for salt_pepper-0.7.6-py3-none-any.whl
Algorithm Hash digest
SHA256 c1db37710b7b0b2f9868a8ca8ddffa8039829aaedf928b50bea70564f72bf614
MD5 51d513665c38f475f2ae0829d5123e30
BLAKE2b-256 86a589d158e16e024eb2c16b1411ffcc2da1457a4fef0bea7231f654cef454e0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page