SHARE
TWEET

Untitled

a guest Mar 23rd, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Saltstack notes
  2. ## salt-master location
  3. > 10.55.9.173
  4. ```sh
  5. ssh calebfranklin@10.55.9.173
  6. ```
  7. ## Every day tasks
  8. ### Create a user
  9. ```sh
  10. salt '<minion_id>' user.add <username> <password>
  11. salt '<minion_id>' user.update <username> password_never_expires=True account_disabled=False unlock_account=True
  12. salt '<minion_id>' user.addgroup <username> "<group>" #typically "Administrators"
  13. ```
  14. ### Delete a user
  15. ```sh
  16. salt '<minion_id>' user.delete <username> remove=True force=True
  17. ```
  18. ### Reset a users password
  19. ```sh
  20. salt '<minion_id' user.setpassword <username> <newpassword>
  21. ```
  22. ### Create a group and add a user to it
  23. ```sh
  24. salt '<minion_id>' group.add <groupname>
  25. salt '<minion_id>' group.adduser <groupname> <username>
  26. ```
  27. ### View unaccepted minion keys
  28. ```sh
  29. salt-key -l un
  30. ```
  31. ### View the IP of a minion
  32. ```sh
  33. salt '<minion_id>' network.ip_addrs
  34. ```
  35. ## Helpful hints
  36. ### Run a single state function
  37. ```sh
  38. salt '<minion_id>' state.single pkg.installed name=vim
  39. ```
  40. ### Apply a specific state to a minion
  41. ```sh
  42. salt '<minion_id>' state.apply <state_name>
  43. ```
  44. ### Dry run / test
  45. ```sh
  46. salt '<minion_id>' state.apply <state_name> test=true
  47. ```
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top