Warning Livedoc is no longer being updated and will be deprecated shortly. Please refer to https://documentation.tjhsst.edu.

Salt/State list

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

Salt states available for use

All states that the CSL wrote will start with tjcsl. to distinguish them from other organizations states. A list of tjcsl. states are below.

Generic states, suitable for all machines

  • tjcsl.ssh - this will make sure that openssh is installed, sshd is running, and manages ssh(d)_config
  • tjcsl.gentools - this makes sure that eix and gentoolkit are installed (for glsa-check, etc)
  • tjcsl.motd - adds the standard CSL banner, with hostname
  • tjcsl.vim - makes sure Vim is installed
  • tjcsl.fish - makes sure the Fish shell is installed

Managing .k5login

/root/.k5login often needs to be managed; this is done with salt. You’ll probably need to create a new state; place it in tjcsl/k5login/<group>.sls, for exampe, tjcsl/k5login/itanium.sls. The state should look something like this:

    - name: /root/.k5login
    - source: salt://config/k5login/<group>
    - mode: 640

You should then put a list of principals allowed to gain root in config/k5login/<group>. When you’re done, the new state is available as tjcsl.k5login.<group>.

Managing clustered applications (load balancer, etc)

Clusters of applications can also be managed with salt:

    - name: /etc/awesomething.conf
    - source: salt://config/cluster/awesome/thing.conf
    - mode: 644
    - name: app-whatever/my-awesome-cluster-app
    - name: service-of-awesome
    - running

Drop these kinds of files in tjcsl/cluster/<app>.sls. Config can go in config/cluster/<appname>/conf.ig.