Differences between revisions 1 and 4 (spanning 3 versions)
Revision 1 as of 2016-09-16 22:54:57
Size: 198
Editor: PieterSmit
Comment:
Revision 4 as of 2017-06-07 10:41:33
Size: 752
Editor: PieterSmit
Comment:
Deletions are marked like this. Additions are marked like this.
Line 7: Line 7:
== salt edit /etc/fstab ==
 * Edit lines in fstab e.g. Match '''cloudimg-rootfs''' and set the last '''0''' to a '''1'''
   {{{ $ sudo salt "*" cmd.run "sed -i '/cloudimg-rootfs\s/ s/0$/1/ ; /cloudimg-bootfs\s/ s/0$/2/' /etc/fstab ; cat /etc/fstab" }}}


== Links ==
 * http://seedickcode.com/devops/saltstack/saltstack-a-better-salt-top-sls-part-2/

 * surveys
   * http://stackoverflow.com/questions/18092979/how-can-i-aggregate-saltstack-command-results
   * https://docs.saltstack.com/en/latest/ref/runners/all/salt.runners.survey.html

Salt Stack configuration management

  • improve output of state.apply to a lot of minions
    • salt --state-output=mixed --summary "*" state.apply backups.deploy

salt edit /etc/fstab

  • Edit lines in fstab e.g. Match cloudimg-rootfs and set the last 0 to a 1

    •  $ sudo salt "*" cmd.run "sed -i '/cloudimg-rootfs\s/ s/0$/1/ ; /cloudimg-bootfs\s/ s/0$/2/' /etc/fstab ; cat /etc/fstab" 

...

SaltStack (last edited 2019-06-16 10:28:54 by PieterSmit)