Skip to content

Instantly share code, notes, and snippets.

@borgstrom
Created March 4, 2014 00:14
Show Gist options
  • Save borgstrom/9337549 to your computer and use it in GitHub Desktop.
Save borgstrom/9337549 to your computer and use it in GitHub Desktop.
Example of the SaltStack pyobjects Map object usage
#!pyobjects
class Samba(Map):
__merge__ = 'samba:lookup'
class Debian:
server = 'samba'
client = 'samba-client'
service = 'samba'
class RougeChapeau:
__match__ = 'RedHat'
server = 'samba'
client = 'samba'
service = 'smb'
class Ubuntu:
__grain__ = 'os'
service = 'smbd'
with Pkg.installed("samba", names=[Samba.server, Samba.client]):
Service.running("samba", name=Samba.service)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment