{"id":27370,"library":"salt","title":"Salt Project","description":"Salt (also known as SaltStack) is a Python-based open-source configuration management and remote execution system. Current version: 3007.14. Release cadence: approximately every 6 months with long-term support (LTS) releases every 2-3 years. It supports parallel execution of commands, state management, and event-driven automation across thousands of systems.","status":"active","version":"3007.14","language":"python","source_language":"en","source_url":"https://github.com/saltstack/salt","tags":["salt","saltstack","configuration-management","remote-execution","devops","infrastructure-as-code"],"install":[{"cmd":"pip install salt","lang":"bash","label":"Install Salt from PyPI"}],"dependencies":[{"reason":"Required for message serialization","package":"msgpack","optional":false},{"reason":"Parsing YAML configuration files","package":"PyYAML","optional":false},{"reason":"Template rendering for state files","package":"Jinja2","optional":false}],"imports":[{"note":"salt.client is a module, not a direct import; use 'import salt.client' then access salt.client.LocalClient","wrong":"from salt import client","symbol":"client","correct":"import salt.client"},{"note":"Use import for namespacing; avoid importing internal attributes directly","wrong":"from salt.config import opts","symbol":"config","correct":"import salt.config"},{"note":"wheel is a submodule, import with full path","wrong":"from salt import wheel","symbol":"wheel","correct":"import salt.wheel"}],"quickstart":{"code":"import salt.client\nimport salt.config\n\n# Load minion config (replace with your own config path)\nopts = salt.config.minion_config('/etc/salt/minion')\n# Create a local client for running commands\nclient = salt.client.LocalClient()\n# Run a test.ping on all minions\nresult = client.cmd('*', 'test.ping')\nprint(result)","lang":"python","description":"Basic usage: load configuration and execute a remote command on all minions."},"warnings":[{"fix":"Load config with salt.config.minion_config('/etc/salt/minion') or minion_config(None) and pass to LocalClient.","message":"salt.client.LocalClient() without arguments defaults to loading minion config from default locations, which may cause issues. Pass opts explicitly.","severity":"deprecated","affected_versions":">=3000"},{"fix":"Use salt.runner.RunnerClient or salt.wheel.WheelClient with explicit client initialization.","message":"Starting from Salt 3006, the 'salt.runner' and 'salt.wheel' APIs changed. Direct use of run() or wheel() may fail.","severity":"breaking","affected_versions":">=3006"},{"fix":"Ensure minion is fully connected before querying grains/pillar, or use the ready grain.","message":"Salt's 'grains' and 'pillar' are lazy-loaded. Accessing them before minion startup may yield incomplete data.","severity":"gotcha","affected_versions":"all"},{"fix":"Use salt-cloud CLI or install cloud provider-specific packages.","message":"The 'salt.cloud' module is deprecated in favor of salt-kubevirt and cloud plugins. Direct import of salt.cloud may stop working.","severity":"deprecated","affected_versions":">=3007"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'pip install salt' and ensure your Python interpreter includes the installed package.","cause":"Salt is not installed or the environment is misconfigured.","error":"ModuleNotFoundError: No module named 'salt'"},{"fix":"Use 'import salt.client' instead of 'import salt'.","cause":"Importing 'salt' alone does not load submodules; need explicit import.","error":"AttributeError: module 'salt' has no attribute 'client'"},{"fix":"Use 'opts' parameter: LocalClient(opts=...).","cause":"Old API usage with keyword argument 'mopts' (deprecated).","error":"salt.client.LocalClient() TypeError: __init__() got an unexpected keyword argument 'mopts'"},{"fix":"Add 'pillar_roots: {base: /srv/pillar}' to /etc/salt/master.","cause":"Missing or misconfigured pillar_roots in master config.","error":"Failed to load pillar: pillar_roots not defined"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}