Salt: Difference between revisions

From DWIKI
Line 8: Line 8:
*[https://techarena51.com/index.php/getting-started-with-saltstack/ Managing Linux server configs with the SaltStack]
*[https://techarena51.com/index.php/getting-started-with-saltstack/ Managing Linux server configs with the SaltStack]
*[https://github.com/saltstack/salt/wiki/Cheat-Sheet Cheat Sheet]
*[https://github.com/saltstack/salt/wiki/Cheat-Sheet Cheat Sheet]
*[https://github.com/harkx/saltstack-cheatsheet Cheat sheet 2]
*[https://blog.talpor.com/2014/07/saltstack-beginners-tutorial/ Salt - Beginners Tutorial]
*[https://blog.talpor.com/2014/07/saltstack-beginners-tutorial/ Salt - Beginners Tutorial]
*https://rizvir.com/articles/saltstack/
*https://rizvir.com/articles/saltstack/

Revision as of 09:30, 12 July 2016

Salt Configuration Management

Links

Tools

Writing custom state modules

Syntax checking etc:

python -m py__compile mymodule.py
saltutil.sync_states

FAQ

Apply just one part of role

Assuming you have foo.sls in roles/

salt '*' state.apply roles.myrole.foo

Change minion hostname

On minion:

  • hostname new.host.name
  • update /etc/hostname
  • update /etc/salt/minion_id
  • restart salt-minion

On master: rename the key ( /srv/salt/pki/master/minions/old.host.name )

Rendering SLS 'base:roles.foo.bar' failed: Jinja variable 'dict object' has no attribute 'blergh'

Unless you made a typo, your minion probably doesn't have access in pillar