Advertisement
k3NGuru

Production.rb

Mar 7th, 2014
449
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.47 KB | None | 0 0
  1. # Simple Role Syntax
  2. # ==================
  3. # Supports bulk-adding hosts to roles, the primary
  4. # server in each group is considered to be the first
  5. # unless any hosts have the primary property set.
  6. # Don't declare `role :all`, it's a meta role
  7. role :app, %w{zabbix@192.168.91.16}
  8. role :web, %w{zabbix@192.168.91.16}
  9. role :db,  %w{zabbix@192.168.91.16}
  10.  
  11. # Extended Server Syntax
  12. # ======================
  13. # This can be used to drop a more detailed server
  14. # definition into the server list. The second argument
  15. # something that quacks like a hash can be used to set
  16. # extended properties on the server.
  17. server '192.168.91.16', user: 'zabbix', roles: %w{web app}, my_property: :my_value
  18.  
  19. # you can set custom ssh options
  20. # it's possible to pass any option but you need to keep in mind that net/ssh understand limited list of options
  21. # you can see them in [net/ssh documentation](http://net-ssh.github.io/net-ssh/classes/Net/SSH.html#method-c-start)
  22. # set it globally
  23. #  set :ssh_options, {
  24. #    keys: %w(/home/rlisowski/.ssh/id_rsa),
  25. #    forward_agent: false,
  26. #    auth_methods: %w(password)
  27. #  }
  28. # and/or per server
  29. # server 'example.com',
  30. #   user: 'user_name',
  31. #   roles: %w{web app},
  32. #   ssh_options: {
  33. #     user: 'user_name', # overrides user setting above
  34. #     keys: %w(/home/user_name/.ssh/id_rsa),
  35. #     forward_agent: false,
  36. #     auth_methods: %w(publickey password)
  37. #     # password: 'please use keys'
  38. #   }
  39. # setting per server overrides global ssh_options
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement