Salt/State setup

From Livedoc - The Documentation Repository
Jump to: navigation, search

Setting up states for nodes

The way salt works, definitions of which states should apply to which machines are defined in top.sls:

base:
    '*':
    - tjcsl.ssh
    - tjcsl.vim
    - tjcsl.motd
    - tjcsl.gentools

Of course, the ’*’ matches all machines, and the list of things defines states which will be applied. We prefer to manage things in node groups if a state should not apply to all machines:

base:
    'itanium':
    - match: nodegroup
    - tjcsl.cluster.postgres

There should be plenty of states defined for you already (see the list of states).