763
Salt Documentation Release 0.16.0 SaltStack, Inc. July 28, 2013

Salt Documentation

Embed Size (px)

DESCRIPTION

Salt is:• a configuration management system, capable of maintaining remote nodes in defined states (for example, ensuringthat specific packages are installed and specific services are running)• a distributed remote execution system used to execute commands and query data on remote nodes, either individuallyor by arbitrary selection criteriaIt was developed in order to bring the best solutions found in the world of remote execution together and make thembetter, faster, and more malleable. Salt accomplishes this through its ability to handle large loads of information,and not just dozens but hundreds and even thousands of individual servers quickly through a simple and manageableinterface.

Citation preview

  • Salt DocumentationRelease 0.16.0

    SaltStack, Inc.

    July 28, 2013

  • CONTENTS

    1 Introduction to Salt 11.1 The 30 second summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Simplicity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.3 Parallel execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.4 Building on proven technology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.5 Python client interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.6 Fast, flexible, scalable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.7 Open . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

    2 Installation 32.1 Quick Install . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32.2 Platform-specific installation instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32.3 Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172.4 Optional Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

    3 Configuring Salt 193.1 Master Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193.2 Minion Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193.3 Running Salt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203.4 Key Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203.5 Sending Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213.6 Whats Next? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

    4 Developing Salt 234.1 Sending a GitHub pull request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234.2 Keeping Salt Forks in Sync . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244.3 Posting patches to the mailing list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244.4 Installing Salt for development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244.5 Using easy_install to Install Salt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274.6 Editing and previewing the documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

    5 Targeting 295.1 Matching the minion id . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295.2 Grains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305.3 Node groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335.4 Compound matchers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335.5 Batch Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

    6 Salt tutorials 356.1 Bootstrapping Salt on Linux EC2 with Cloud-Init . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

    i

  • 6.2 Salt as a Cloud Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366.3 Using cron with Salt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376.4 Automatic Updates / Frozen Deployments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386.5 Opening the Firewall up for Salt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396.6 GitFS Backend Walkthrough . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406.7 Remote execution tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426.8 Multi Master Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446.9 Pillar Walkthrough . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466.10 Preseed Minion with Accepted Key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496.11 Salt Masterless Quickstart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506.12 Standalone Minion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 516.13 How Do I Use Salt States? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 526.14 States tutorial, part 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 606.15 States tutorial, part 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 626.16 States tutorial, part 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 646.17 States tutorial, part 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 686.18 Salt Stack Walkthrough . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

    7 Access Control System 79

    8 External Authentication System 818.1 Tokens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81

    9 Pillar of Salt 839.1 Declaring the Master Pillar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 839.2 Pillar namespace flattened . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 849.3 Including Other Pillars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 849.4 Viewing Minion Pillar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 859.5 Pillar get Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 859.6 Refreshing Pillar Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 859.7 Targeting with Pillar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 869.8 Master Config In Pillar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86

    10 Master Tops System 87

    11 Job Management 8911.1 The Minion proc System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8911.2 Functions in the saltutil Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8911.3 The jobs Runner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89

    12 Salt Scheduling 9112.1 Scheduler With Returner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91

    13 Running the Salt Master as Unprivileged User 93

    14 Troubleshooting 9514.1 Running in the Foreground . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9514.2 What Ports do the Master and Minion Need Open? . . . . . . . . . . . . . . . . . . . . . . . . . . . 9514.3 Using salt-call . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9514.4 Too many open files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9614.5 Salt Master Stops Responding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9614.6 Salt and SELinux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9714.7 Red Hat Enterprise Linux 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9714.8 Common YAML Gotchas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9714.9 Live Python Debug Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

    ii

  • 15 YAML Idiosyncrasies 9915.1 Spaces vs Tabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9915.2 Indentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9915.3 True/False, Yes/No, On/Off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10015.4 Integers are Parsed as Integers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10015.5 YAML does not like Double Short Decs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10115.6 YAML support only plain ASCII . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10215.7 Underscores stripped in Integer Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

    16 Community 10316.1 Mailing List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10316.2 IRC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10316.3 Follow on Github . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10316.4 The Red45 Blog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10316.5 Example Salt States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10416.6 Follow on ohloh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10416.7 Other community links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10416.8 Developing Salt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104

    17 Salt Based Projects 11117.1 Salt Sandbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

    18 Salt Event System 11318.1 Listening for Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113

    19 The Salt Mine 11519.1 Mine Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11519.2 Mine Interval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115

    20 Salt Virt - The Salt Stack Cloud Controller 11720.1 Salt Virt Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11720.2 The Salt Virt Runner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11720.3 Based on Live State Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118

    21 Virtual Machine Network Profiles 11921.1 Define More Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

    22 Running The Tests 12122.1 Writing Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

    23 Integration Tests 123

    24 Unit Tests 125

    25 Integration Tests 12725.1 Integration Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12725.2 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128

    26 Reactor System 13126.1 Event System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13126.2 Mapping Events to Reactor SLS Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13126.3 Understanding the Structure of Reactor Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

    27 Salt Conventions 13327.1 Salt Release Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13327.2 Salt Coding Style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134

    iii

  • 28 Salt Release Process 13928.1 Feature Release Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13928.2 Maintenance and Bugfix Releases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139

    29 Salt Coding Style 14129.1 Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14129.2 Imports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14229.3 Vertical is Better . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14229.4 Indenting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14329.5 Code Churn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144

    30 Salt Stack Git Policy 14530.1 New Code Entry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14530.2 Release Branching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145

    31 Salt Development Guidelines 14731.1 Deprecating Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14731.2 Dunder Dictionaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14731.3 External Pillars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14831.4 Modular Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15131.5 Package Providers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153

    32 Introduction to Extending Salt 15932.1 Client API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15932.2 Adding Loadable Plugins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

    33 Modules 16133.1 Modules Are Easy to Write! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16133.2 Cross Calling Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16133.3 Preloaded Modules Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16233.4 Printout Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16233.5 Virtual Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16333.6 Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16333.7 How Functions are Read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16433.8 Useful Decorators for Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16433.9 Examples of Salt Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165

    34 Full list of builtin execution modules 16734.1 salt.modules.pkg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16734.2 salt.modules.sys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16734.3 salt.modules.aliases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17134.4 salt.modules.alternatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17234.5 salt.modules.apache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17234.6 salt.modules.apt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17434.7 salt.modules.archive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17834.8 salt.modules.at . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17934.9 salt.modules.augeas_cfg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18034.10 salt.modules.bluez . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18134.11 salt.modules.brew . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18234.12 salt.modules.bridge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18434.13 salt.modules.bsd_shadow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18534.14 salt.modules.cassandra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18634.15 salt.modules.cmdmod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18734.16 salt.modules.config . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19134.17 salt.modules.cp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192

    iv

  • 34.18 salt.modules.cron . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19434.19 salt.modules.daemontools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19634.20 salt.modules.darwin_sysctl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19734.21 salt.modules.data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19734.22 salt.modules.debconfmod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19834.23 salt.modules.debian_service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19934.24 salt.modules.dig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20034.25 salt.modules.disk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20134.26 salt.modules.djangomod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20234.27 salt.modules.dnsmasq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20234.28 salt.modules.dnsutil . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20334.29 salt.modules.dpkg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20534.30 salt.modules.ebuild . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20534.31 salt.modules.eix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20934.32 salt.modules.eselect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20934.33 salt.modules.event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21034.34 salt.modules.extfs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21034.35 salt.modules.file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21234.36 salt.modules.freebsdjail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22134.37 salt.modules.freebsdkmod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22234.38 salt.modules.freebsdpkg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22334.39 salt.modules.freebsdservice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22634.40 salt.modules.freebsd_sysctl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22834.41 salt.modules.gem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22834.42 salt.modules.gentoolkitmod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23034.43 salt.modules.gentoo_service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23134.44 salt.modules.git . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23334.45 salt.modules.glance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23834.46 salt.modules.grains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23934.47 salt.modules.groupadd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24034.48 salt.modules.grub_legacy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24134.49 salt.modules.guestfs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24134.50 salt.modules.hg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24234.51 salt.modules.hosts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24334.52 salt.modules.img . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24434.53 salt.modules.iptables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24534.54 salt.modules.keyboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24734.55 salt.modules.key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24734.56 salt.modules.keystone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24734.57 salt.modules.kmod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25034.58 salt.modules.launchctl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25134.59 salt.modules.layman . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25234.60 salt.modules.ldapmod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25334.61 salt.modules.linux_acl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25434.62 salt.modules.linux_lvm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25534.63 salt.modules.linux_sysctl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25634.64 salt.modules.localemod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25634.65 salt.modules.locate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25734.66 salt.modules.logrotate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25834.67 salt.modules.makeconf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25834.68 salt.modules.match . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26534.69 salt.modules.mdadm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26634.70 salt.modules.mine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26734.71 salt.modules.mongodb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268

    v

  • 34.72 salt.modules.monit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26934.73 salt.modules.moosefs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27034.74 salt.modules.mount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27034.75 salt.modules.munin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27234.76 salt.modules.mysql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27234.77 salt.modules.netbsdservice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27834.78 salt.modules.netbsd_sysctl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27934.79 salt.modules.network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28034.80 salt.modules.nfs3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28134.81 salt.modules.nginx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28234.82 salt.modules.nova . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28234.83 salt.modules.npm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28434.84 salt.modules.nzbget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28534.85 salt.modules.openbsdpkg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28634.86 salt.modules.openbsdservice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28834.87 salt.modules.osxdesktop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28834.88 salt.modules.pacman . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28934.89 salt.modules.pam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29134.90 salt.modules.parted . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29234.91 salt.modules.pecl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29534.92 salt.modules.pillar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29534.93 salt.modules.pip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29634.94 salt.modules.pkgin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29934.95 salt.modules.pkgng . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30234.96 salt.modules.pkg_resource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31134.97 salt.modules.pkgutil . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31334.98 salt.modules.portage_config . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31534.99 salt.modules.postgres . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31634.100salt.modules.poudriere . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31934.101salt.modules.ps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32034.102salt.modules.publish . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32234.103salt.modules.puppet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32334.104salt.modules.pw_group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32434.105salt.modules.pw_user . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32434.106salt.modules.qemu_img . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32634.107salt.modules.qemu_nbd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32634.108salt.modules.quota . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32734.109salt.modules.rabbitmq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32834.110salt.modules.rbenv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33034.111salt.modules.reg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33134.112salt.modules.ret . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33234.113salt.modules.rh_ip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33234.114salt.modules.rh_service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33434.115salt.modules.rpm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33534.116salt.modules.rvm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33634.117salt.modules.s3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33934.118salt.modules.saltutil . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34134.119salt.modules.selinux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34334.120salt.modules.service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34434.121salt.modules.shadow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34534.122salt.modules.smartos_imgadm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34634.123salt.modules.smartos_vmadm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34734.124salt.modules.smf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34834.125salt.modules.solaris_group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350

    vi

  • 34.126salt.modules.solarispkg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35034.127salt.modules.solaris_shadow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35334.128salt.modules.solaris_user . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35434.129salt.modules.solr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35634.130salt.modules.sqlite3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36234.131salt.modules.ssh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36334.132salt.modules.state . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36434.133salt.modules.status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36634.134salt.modules.supervisord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36834.135salt.modules.svn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37034.136salt.modules.sysbench . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37234.137salt.modules.sysmod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37334.138salt.modules.systemd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37434.139salt.modules.system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37634.140salt.modules.test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37634.141salt.modules.timezone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37934.142salt.modules.tls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38034.143salt.modules.tomcat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38234.144salt.modules.upstart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38634.145salt.modules.useradd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38834.146salt.modules.virt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39034.147salt.modules.virtualenv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39634.148salt.modules.win_disk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39734.149salt.modules.win_file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39734.150salt.modules.win_groupadd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39834.151salt.modules.win_network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39934.152salt.modules.win_pkg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40134.153salt.modules.win_service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40334.154salt.modules.win_shadow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40534.155salt.modules.win_status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40534.156salt.modules.win_system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40634.157salt.modules.xapi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40634.158salt.modules.yumpkg5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41134.159salt.modules.yumpkg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41334.160salt.modules.zfs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41834.161salt.modules.zpool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41834.162salt.modules.zypper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420

    35 Returners 42335.1 Using Returners . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42335.2 Writing a Returner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423

    36 Full list of builtin returner modules 42536.1 salt.returners.carbon_return . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42536.2 salt.returners.cassandra_return . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42536.3 salt.returners.local . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42636.4 salt.returners.mongo_future_return . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42636.5 salt.returners.mongo_return . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42636.6 salt.returners.mysql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42736.7 salt.returners.postgres . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42836.8 salt.returners.redis_return . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43036.9 salt.returners.sentry_return . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43036.10 salt.returners.smtp_return . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43136.11 salt.returners.syslog_return . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431

    vii

  • 37 File State Backups 43337.1 Backed-up Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43337.2 Interacting with Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433

    38 Extending External SLS Data 43738.1 The Extend Declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43738.2 Extend is a Top Level Declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43738.3 The Requisite in Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43838.4 Rules to Extend By . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438

    39 Failhard Global Option 43939.1 State Level Failhard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43939.2 Global Failhard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439

    40 Highstate data structure definitions 44140.1 The Salt State Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44140.2 Large example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445

    41 Include and Exclude 44741.1 Include . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44741.2 Relative Include . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44741.3 Exclude . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447

    42 State Enforcement 44942.1 State management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44942.2 Understanding the Salt State System Components . . . . . . . . . . . . . . . . . . . . . . . . . . . 449

    43 State System Layers 45343.1 Function Call . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45343.2 Low Chunk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45343.3 Low State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45343.4 High Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45443.5 SLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45443.6 HighState . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45443.7 OverState . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454

    44 Ordering States 45544.1 Requisite Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45544.2 The Order Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458

    45 OverState System 45945.1 The Over State SLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45945.2 Adding Functions To Overstate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46045.3 Executing the Over State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460

    46 State Providers 46146.1 Arbitrary Module Redirects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461

    47 Requisites 46347.1 Requisite and Requisite in types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464

    48 Startup States 46748.1 Examples: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467

    49 State Testing 46949.1 Default Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469

    viii

  • 50 The Top File 47150.1 Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47150.2 Other Ways of Targeting Minions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47350.3 How Top Files Are Compiled . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474

    51 SLS Template Variable Reference 47751.1 Salt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47751.2 Opts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47751.3 Pillar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47751.4 Grains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47851.5 env . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47851.6 sls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478

    52 State Modules 47952.1 States are Easy to Write! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47952.2 Using Custom State Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47952.3 Cross Calling Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47952.4 Return Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48052.5 Test State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48052.6 Watcher Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48052.7 Mod_init Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481

    53 Full list of builtin state modules 48353.1 salt.states.alias . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48453.2 salt.states.alternatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48453.3 salt.states.cmd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48553.4 salt.states.cron . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48953.5 salt.states.debconfmod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49153.6 salt.states.disk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49253.7 salt.states.eselect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49253.8 salt.states.file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49353.9 salt.states.gem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50153.10 salt.states.git . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50253.11 salt.states.grains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50353.12 salt.states.group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50353.13 salt.states.hg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50453.14 salt.states.host . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50453.15 salt.states.keyboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50553.16 salt.states.kmod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50553.17 salt.states.layman . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50653.18 salt.states.libvirt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50653.19 salt.states.locale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50653.20 salt.states.lvm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50753.21 salt.states.makeconf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50853.22 salt.states.mdadm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50853.23 salt.states.module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50953.24 salt.states.mongodb_database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50953.25 salt.states.mongodb_user . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51053.26 salt.states.mount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51053.27 salt.states.mysql_database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51153.28 salt.states.mysql_grants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51253.29 salt.states.mysql_user . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51353.30 salt.states.network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51453.31 salt.states.npm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517

    ix

  • 53.32 salt.states.pecl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51853.33 salt.states.pip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51853.34 salt.states.pkgng . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51953.35 salt.states.pkg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51953.36 salt.states.pkgrepo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52253.37 salt.states.portage_config . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52453.38 salt.states.postgres_database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52453.39 salt.states.postgres_group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52553.40 salt.states.postgres_user . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52653.41 salt.states.quota . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52653.42 salt.states.rabbitmq_user . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52753.43 salt.states.rabbitmq_vhost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52753.44 salt.states.rbenv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52853.45 salt.states.rvm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52953.46 salt.states.selinux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53153.47 salt.states.service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53153.48 salt.states.ssh_auth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53253.49 salt.states.ssh_known_hosts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53453.50 salt.states.stateconf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53453.51 salt.states.supervisord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53553.52 salt.states.svn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53553.53 salt.states.sysctl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53653.54 salt.states.timezone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53653.55 salt.states.tomcat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53753.56 salt.states.user . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53853.57 salt.states.virtualenv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540

    54 Renderers 54154.1 Multiple Renderers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54154.2 Composing Renderers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54154.3 Writing Renderers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54254.4 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 542

    55 Full list of builtin renderer modules 54555.1 salt.renderers.jinja . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54555.2 salt.renderers.json . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54955.3 salt.renderers.mako . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54955.4 salt.renderers.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55055.5 salt.renderers.pydsl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55055.6 salt.renderers.stateconf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55455.7 salt.renderers.wempy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55855.8 salt.renderers.yaml . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 558

    56 Pillars 559

    57 Full list of builtin pillar modules 56157.1 salt.pillar.cmd_json . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56157.2 salt.pillar.cmd_yaml . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56157.3 salt.pillar.cobbler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56157.4 salt.pillar.git_pillar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56257.5 salt.pillar.hiera . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56257.6 salt.pillar.libvirt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56257.7 salt.pillar.mongo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56357.8 salt.pillar.pillar_ldap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56457.9 salt.pillar.puppet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564

    x

  • 57.10 salt.pillar.reclass_adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564

    58 Master Tops 567

    59 Full list of builtin master tops modules 56959.1 salt.tops.cobbler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56959.2 salt.tops.ext_nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56959.3 salt.tops.mongo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57059.4 salt.tops.reclass_adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 571

    60 Salt Runners 57360.1 Writing Salt Runners . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57360.2 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573

    61 Full list of runner modules 57561.1 salt.runners.cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57561.2 salt.runners.doc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57561.3 salt.runners.fileserver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57661.4 salt.runners.jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57661.5 salt.runners.launchd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57661.6 salt.runners.manage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57661.7 salt.runners.network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57761.8 salt.runners.search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57761.9 salt.runners.state . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57761.10 salt.runners.virt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57761.11 salt.runners.winrepo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 578

    62 Full list of builtin wheel modules 57962.1 salt.wheel.config . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57962.2 salt.wheel.file_roots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57962.3 salt.wheel.key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58062.4 salt.wheel.pillar_roots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 580

    63 Full list of builtin output modules 58163.1 salt.output.grains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58163.2 salt.output.highstate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58163.3 salt.output.json_out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58263.4 salt.output.key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58263.5 salt.output.nested . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58263.6 salt.output.no_out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58263.7 salt.output.no_return . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58263.8 salt.output.overstatestage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58363.9 salt.output.pprint_out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58363.10 salt.output.raw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58363.11 salt.output.txt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58363.12 salt.output.virt_query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58363.13 salt.output.yaml_out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583

    64 Salt client API interfaces 585

    65 Peer Communication 58765.1 Peer Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58765.2 Peer Runner Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58865.3 Using Peer Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 588

    xi

  • 66 Client ACL system 58966.1 Permission Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589

    67 Salt Syndic 59167.1 Configuring the Syndic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59167.2 Running the Syndic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591

    68 Python client API 59368.1 Using the LocalClient API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59368.2 Compound Command Execution With the Salt API . . . . . . . . . . . . . . . . . . . . . . . . . . . 59668.3 Salt Caller API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 596

    69 File Server Backends 59969.1 Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599

    70 Dynamic Module Distribution 60170.1 Sync Via States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60170.2 Sync Via the saltutil Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 601

    71 File Server Configuration 60371.1 Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60371.2 Directory Overlay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60371.3 Local File Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 604

    72 Salt File Server 60572.1 The cp Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60572.2 File Server Client API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 606

    73 Configuration file examples 60973.1 Example master configuration file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60973.2 Example minion configuration file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 617

    74 Configuring the Salt Master 62774.1 Primary Master Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62774.2 interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62774.3 publish_port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62774.4 user . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62774.5 max_open_files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62874.6 worker_threads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62874.7 ret_port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62874.8 pidfile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62874.9 root_dir . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62874.10 pki_dir . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62974.11 cachedir . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62974.12 keep_jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62974.13 job_cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62974.14 ext_job_cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62974.15 minion_data_cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63074.16 enforce_mine_cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63074.17 sock_dir . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63074.18 Master Security Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63074.19 open_mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63074.20 auto_accept . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63074.21 autosign_file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63174.22 client_acl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 631

    xii

  • 74.23 Master Module Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63174.24 runner_dirs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63174.25 cython_enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63174.26 Master State System Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63174.27 state_verbose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63174.28 state_output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63274.29 state_top . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63274.30 external_nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63274.31 renderer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63274.32 failhard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63274.33 test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63374.34 Master File Server Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63374.35 file_roots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63374.36 hash_type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63374.37 file_buffer_size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63374.38 Pillar Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63474.39 pillar_roots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63474.40 ext_pillar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63474.41 Syndic Server Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63474.42 order_masters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63474.43 syndic_master . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63574.44 syndic_master_port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63574.45 syndic_log_file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63574.46 syndic_pidfile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63574.47 Peer Publish Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63574.48 peer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63674.49 peer_run . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63674.50 Node Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63674.51 Master Logging Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63674.52 log_file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63674.53 log_level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63774.54 log_level_logfile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63774.55 log_datefmt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63774.56 log_datefmt_logfile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63774.57 log_fmt_console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63774.58 log_fmt_logfile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63874.59 log_granular_levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63874.60 default_include . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 638

    75 Configuring the Salt Minion 63975.1 Minion Primary Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63975.2 master . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63975.3 master_port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63975.4 user . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63975.5 pidfile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64075.6 root_dir . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64075.7 pki_dir . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64075.8 id . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64075.9 append_domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64075.10 cachedir . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64075.11 verify_env . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64175.12 cache_jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64175.13 sock_dir . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64175.14 backup_mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 641

    xiii

  • 75.15 acceptance_wait_time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64175.16 acceptance_wait_time_max . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64275.17 dns_check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64275.18 ipc_mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64275.19 tcp_pub_port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64275.20 tcp_pull_port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64275.21 Minion Module Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64275.22 disable_modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64275.23 disable_returners . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64375.24 module_dirs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64375.25 returner_dirs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64375.26 states_dirs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64375.27 render_dirs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64375.28 cython_enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64475.29 providers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64475.30 State Management Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64475.31 renderer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64475.32 state_verbose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64475.33 state_output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64475.34 autoload_dynamic_modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64575.35 environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64575.36 Security Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64575.37 open_mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64575.38 Thread Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64575.39 Minion Logging Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64675.40 log_file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64675.41 log_level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64675.42 log_level_logfile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64675.43 log_datefmt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64675.44 log_datefmt_logfile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64775.45 log_fmt_console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64775.46 log_fmt_logfile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64775.47 log_granular_levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64775.48 default_include . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64775.49 include . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64775.50 Frozen Build Update Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64875.51 update_url . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64875.52 update_restart_services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 648

    76 Salt code and internals 64976.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 649

    77 Network Topology 65377.1 Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65377.2 PUB/SUB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65377.3 Return . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 653

    78 Windows Software Repository 65578.1 Generate Repo Cache File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65778.2 Install Windows Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65778.3 Uninstall Windows Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65778.4 Standalone Minion Salt Windows Repo Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65878.5 Git Hosted Repo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 658

    79 Command Line Reference 659

    xiv

  • 79.1 Using the Salt Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659

    80 salt 66380.1 Synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66380.2 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66380.3 Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66380.4 See also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 665

    81 salt-master 66781.1 Synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66781.2 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66781.3 Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66781.4 See also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 668

    82 salt-minion 66982.1 Synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66982.2 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66982.3 Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66982.4 See also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 670

    83 salt-key 67183.1 Synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67183.2 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67183.3 Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67183.4 See also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672

    84 salt-cp 67384.1 Synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67384.2 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67384.3 Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67384.4 See also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 674

    85 salt-call 67585.1 Synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67585.2 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67585.3 Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67585.4 See also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676

    86 salt-run 67786.1 Synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67786.2 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67786.3 Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67786.4 See also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 677

    87 salt-syndic 67987.1 Synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67987.2 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67987.3 Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67987.4 See also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679

    88 Release notes and upgrade instructions 68188.1 Salt 0.10.0 Release Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68188.2 Salt 0.10.2 Release Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68288.3 Salt 0.10.3 Release Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68588.4 Salt 0.10.4 Release Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 688

    xv

  • 88.5 Salt 0.10.5 Release Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68988.6 Salt 0.11.0 Release Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69288.7 Salt 0.12.0 Release Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69488.8 Salt 0.13.0 Release Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69588.9 Salt 0.14.0 Release Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69788.10 Salt 0.15.0 Release Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69888.11 Salt 0.15.1 Release Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70088.12 Salt 0.16.0 Release Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70188.13 Salt 0.6.0 release notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70388.14 Salt 0.7.0 release notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70488.15 Salt 0.8.0 release notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70588.16 Salt 0.8.7 release notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70788.17 Salt 0.8.8 release notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70888.18 Salt 0.8.9 Release Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70988.19 Salt 0.9.0 Release Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71188.20 Salt 0.9.2 Release Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71388.21 Salt 0.9.3 Release Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71588.22 Salt 0.9.4 Release Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71888.23 Salt 0.9.5 Release Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72088.24 Salt 0.9.6 Release Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72788.25 Salt 0.9.7 Release Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72888.26 Salt 0.9.8 Release Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73188.27 Salt 0.9.9 Release Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 736

    Python Module Index 741

    xvi

  • CHAPTER

    ONE

    INTRODUCTION TO SALT

    Were not just talking about NaCl.

    1.1 The 30 second summary

    Salt is:

    a configuration management system, capable of maintaining remote nodes in defined states (for example, ensur-ing that specific packages are installed and specific services are running)

    a distributed remote execution system used to execute commands and query data on remote nodes, either indi-vidually or by arbitrary selection criteria

    It was developed in order to bring the best solutions found in the world of remote execution together and make thembetter, faster, and more malleable. Salt accomplishes this through its ability to handle large loads of information,and not just dozens but hundreds and even thousands of individual servers quickly through a simple and manageableinterface.

    1.2 Simplicity

    Providing versatility between massive scale deployments and smaller systems may seem daunting, but Salt is verysimple to set up and maintain, regardless of the size of the project. The architecture of Salt is designed to workwith any number of servers, from a handful of local network systems to international deployments across differentdatacenters. The topology is a simple server/client model with the needed functionality built into a single set ofdaemons. While the default configuration will work with little to no modification, Salt can be fine tuned to meetspecific needs.

    1.3 Parallel execution

    The core functions of Salt:

    enable commands to remote systems to be called in parallel rather than serially

    use a secure and encrypted protocol

    use the smallest and fastest network payloads possible

    provide a simple programming interface

    Salt also introduces more granular controls to the realm of remote execution, allowing systems to be targeted not justby hostname, but also by system properties.

    1

  • Salt Documentation, Release 0.16.0

    1.4 Building on proven technology

    Salt takes advantage of a number of technologies and techniques. The networking layer is built with the excellentZeroMQ networking library, so the Salt daemon includes a viable and transparent AMQ broker. Salt uses public keysfor authentication with the master daemon, then uses faster AES encryption for payload communication; authenticationand encryption are integral to Salt. Salt takes advantage of communication via msgpack, enabling fast and lightnetwork traffic.

    1.5 Python client interface

    In order to allow for simple expansion, Salt execution routines can be written as plain Python modules. The datacollected from Salt executions can be sent back to the master server, or to any arbitrary program. Salt can be calledfrom a simple Python API, or from the command line, so that Salt can be used to execute one-off commands as wellas operate as an integral part of a larger application.

    1.6 Fast, flexible, scalable

    The result is a system that can execute commands at high speed on target server groups ranging from one to very manyservers. Salt is very fast, easy to set up, amazingly malleable and provides a single remote execution architecture thatcan manage the diverse requirements of any number of servers. The Salt infrastructure brings together the best of theremote execution world, amplifies its capabilities and expands its range, resulting in a system that is as versatile as itis practical, suitable for any network.

    1.7 Open

    Salt is developed under the Apache 2.0 license, and can be used for open and proprietary projects. Please submit yourexpansions back to the Salt project so that we can all benefit together as Salt grows. Please feel free to sprinkle Saltaround your systems and let the deliciousness come forth.

    2 Chapter 1. Introduction to Salt

  • CHAPTER

    TWO

    INSTALLATION

    The Salt system setup is amazingly simple, as this is one of the central design goals of Salt.

    See Also:

    Installing Salt for development and contributing to the project.

    2.1 Quick Install

    Many popular distributions will be able to install the salt minion by executing the bootstrap script:

    wget -O - http://bootstrap.saltstack.org | sudo sh

    The script should also make it simple to install a salt master, if desired.

    Currently the install script has been tested to work on:

    Ubuntu 10.x/11.x/12.x

    Debian 6.x

    CentOS 6.3

    Fedora

    Arch

    FreeBSD 9.0

    See Salt Bootstrap for more information.

    2.2 Platform-specific installation instructions

    These guides go into detail how to install salt on a given platform.

    2.2.1 Arch Linux

    Installation

    Salt is currently available via the Arch User Repository (AUR). There are currently stable and -git packages available.

    3

  • Salt Documentation, Release 0.16.0

    Stable Release

    Install Salt stable releases from the Arch Linux AUR as follows:

    wget https://aur.archlinux.org/packages/sa/salt/salt.tar.gztar xf salt.tar.gzcd salt/makepkg -is

    A few of Salts dependencies are currently only found within the AUR, so it is necessary to download and runmakepkg -is on these as well. As a reference, Salt currently relies on the following packages which are onlyavailable via the AUR:

    https://aur.archlinux.org/packages/py/python2-msgpack/python2-msgpack.tar.gz

    https://aur.archlinux.org/packages/py/python2-psutil/python2-psutil.tar.gz

    Note: yaourt

    If a tool such as Yaourt is used, the dependencies will be gathered and built automatically.

    The command to install salt using the yaourt tool is:

    yaourt salt

    Tracking develop

    To install the bleeding edge version of Salt (may include bugs!), use the -git package. Installing the -git package asfollows:

    wget https://aur.archlinux.org/packages/sa/salt-git/salt-git.tar.gztar xf salt-git.tar.gzcd salt-git/makepkg -is

    See the note above about Salts dependencies.

    Post-installation tasks

    systemd

    Activate the Salt Master and/or Minion via systemctl as follows:

    systemctl enable salt-master.servicesystemctl enable salt-minion.service

    Start the Master

    Once youve completed all of these steps youre ready to start your Salt Master. You should be able to start your SaltMaster now using the command seen here:

    systemctl start salt-master

    Now go to the Configuring Salt page.

    4 Chapter 2. Installation

  • Salt Documentation, Release 0.16.0

    2.2.2 Debian Installation

    Currently the latest packages for Debian Old Stable, Stable and Unstable (Squeeze, Wheezy and Sid) are published inour (saltstack.com) debian repository.

    Configure Apt

    Squeeze (Old Stable)

    For squeeze, you will need to enable the debian backports repository as well as the debian.saltstack.com repository.To do so, add the following to /etc/apt/sources.list or a file in /etc/apt/sources.list.d:

    deb http://debian.saltstack.com/debian squeeze-saltstack maindeb http://backports.debian.org/debian-backports squeeze-backports main contrib non-free

    Wheezy (Stable)

    For wheezy, the following line is needed in either /etc/apt/sources.list or a file in/etc/apt/sources.list.d:

    deb http://debian.saltstack.com/debian wheezy-saltstack main

    Sid (Unstable)

    For sid, the following line is needed in either /etc/apt/sources.list or a file in/etc/apt/sources.list.d:

    deb http://debian.saltstack.com/debian unstable main

    Import the repository key.

    You will need to import the key used for signing.

    wget -q -O- "http://debian.saltstack.com/debian-salt-team-joehealy.gpg.key" | apt-key add -

    Note: You can optionally verify the key integrity with sha512sum using the public key signature shown here. E.g:

    echo "b702969447140d5553e31e9701be13ca11cc0a7ed5fe2b30acb8491567560ee62f834772b5095d735dfcecb2384a5c1a20045f52861c417f50b68dd5ff4660e6 debian-salt-team-joehealy.gpg.key" | sha512sum -c

    Update the package database

    apt-get update

    Install packages

    Install the Salt master, minion, or syndic from the repository with the apt-get command. These examples each installone daemon, but more than one package name may be given at a time:

    2.2. Platform-specific installation instructions 5

  • Salt Documentation, Release 0.16.0

    apt-get install salt-master

    apt-get install salt-minion

    apt-get install salt-syndic

    Post-installation tasks

    Now go to the Configuring Salt page.

    Notes

    1. These packages will be backported from the packages intended to be uploaded into debian unstable. This meansthat the packages will be built for unstable first and then backported over the next day or so.

    2. These packages will be tracking the released versions of salt rather than maintaining a stable fixed feature set. If afixed version is what you desire, then either pinning or manual installation may be more appropriate for you.

    3. The version numbering and backporting process should provide clean upgrade paths between debian versions.

    If you have any questions regarding these, please email the mailing list or look for joehh on irc.

    2.2.3 Fedora

    Beginning with version 0.9.4, Salt has been available in the primary Fedora repositories and EPEL. It is installableusing yum. Fedora will have more up to date versions of Salt than other members of the Red Hat family, which makesit a great place to help improve Salt!

    Installation

    Salt can be installed using yum and is available in the standard Fedora repositories.

    Stable Release

    Salt is packaged separately for the minion and the master. It is necessary only to install the appropriate package forthe role the machine will play. Typically, there will be one master and multiple minions.

    yum install salt-masteryum install salt-minion

    Post-installation tasks

    Master

    To have the Master start automatically at boot time:

    systemctl enable salt-master.service

    To start the Master:

    systemctl start salt-master.service

    6 Chapter 2. Installation

  • Salt Documentation, Release 0.16.0

    Minion

    To have the Minion start automatically at boot time:

    systemctl enable salt-minion.service

    To start the Minion:

    systemctl start salt-minion.service

    Now go to the Configuring Salt page.

    2.2.4 FreeBSD

    Salt was added to the FreeBSD ports tree Dec 26th, 2011 by Christer Edwards . It hasbeen tested on FreeBSD 7.4, 8.2, 9.0 and 9.1 releases.

    Salt is dependent on the following additional ports. These will be installed as dependencies of thesysutils/py-salt port.

    /devel/py-yaml/devel/py-pyzmq/devel/py-Jinja2/devel/py-msgpack/security/py-pycrypto/security/py-m2crypto

    Installation

    To install Salt from the FreeBSD ports tree, use the command:

    make -C