Advertisement
Guest User

Untitled

a guest
Mar 26th, 2014
18
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. directory_present:
  2. file.directory:
  3. - name: /root/.ssh
  4. - user: root
  5. - group: wheel
  6. - mode: 700
  7.  
  8. ## this smells like I should be using a template :)
  9.  
  10. keyfile_present:
  11. file.managed:
  12. - name: /root/.ssh/authorized_keys
  13. - user: root
  14. - group: wheel
  15. - mode: 600
  16. - require:
  17. - file: directory_present
  18.  
  19. key_present:
  20. file.append:
  21. - name: /root/.ssh/authorized_keys
  22. - source: salt://root-ssh/vagrant-insecure.pub
  23. - require:
  24. - file: keyfile_present
  25.  
  26. configfile_present:
  27. file.managed:
  28. - name: /root/.ssh/config
  29. - user: root
  30. - group: wheel
  31. - mode: 600
  32. - require:
  33. - file: directory_present
  34.  
  35. configfile_contents:
  36. file.append:
  37. - name: /root/.ssh/config
  38. - source: salt://root-ssh/config
  39. - require:
  40. - file: configfile_present
  41.  
  42. {% for item in ['root@insightcruises.com', 'root@insightcruises.com.pub'] %}
  43. /root/.ssh/{{ item }}:
  44. file.managed:
  45. - user: root
  46. - group: wheel
  47. - mode: 600
  48. - source: salt://root-ssh/{{ item }}
  49. - require:
  50. - file: directory_present
  51. {% endfor %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement