Advertisement
Guest User

Untitled

a guest
Nov 24th, 2014
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.47 KB | None | 0 0
  1. vagrant@lucid32:~$ sudo netstat -tunelp
  2. Active Internet connections (only servers)
  3. Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name
  4. tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 0 3749 605/sshd
  5. tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN 1000 5169 1110/0
  6. tcp 0 0 0.0.0.0:48828 0.0.0.0:* LISTEN 0 3445 552/rpc.statd
  7. tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 0 3228 484/portmap
  8. tcp6 0 0 :::22 :::* LISTEN 0 3751 605/sshd
  9. tcp6 0 0 ::1:6010 :::* LISTEN 1000 5168 1110/0
  10. udp 0 0 0.0.0.0:68 0.0.0.0:* 0 4179 917/dhclient
  11. udp 0 0 0.0.0.0:68 0.0.0.0:* 0 3277 558/dhclient3
  12. udp 0 0 0.0.0.0:728 0.0.0.0:* 0 3430 552/rpc.statd
  13. udp 0 0 0.0.0.0:111 0.0.0.0:* 0 3227 484/portmap
  14. udp 0 0 0.0.0.0:54265 0.0.0.0:* 0 3442 552/rpc.statd
  15. udp 0 0 10.0.2.15:123 0.0.0.0:* 102 4259 904/ntpd
  16. udp 0 0 127.0.0.1:123 0.0.0.0:* 0 4208 904/ntpd
  17. udp 0 0 0.0.0.0:123 0.0.0.0:* 0 4203 904/ntpd
  18. udp6 0 0 fe80::a00:27ff:feb5:123 :::* 0 4210 904/ntpd
  19. udp6 0 0 ::1:123 :::* 0 4209 904/ntpd
  20. udp6 0 0 :::123 :::* 0 4204 904/ntpd
  21. vagrant@lucid32:~$
  22.  
  23. vagrant@lucid32:~$ sudo puppet apply --verbose /vagrant/manifests/default.pp
  24. info: Applying configuration version '1359558916'
  25. notice: /Stage[main]/Apachevarnish/Service[apache2]/ensure: ensure changed 'stopped' to 'running'
  26. notice: Finished catalog run in 0.15 seconds
  27.  
  28. class apachevarnish {
  29.  
  30.  
  31. Package { ensure => "installed" }
  32.  
  33. package { "apache2": }
  34. package { "varnish": }
  35.  
  36. file { '/etc/hosts':
  37. ensure => link,
  38. target => "/vagrant/hosts",
  39. force => true
  40. }
  41.  
  42. file { '/var/www':
  43. ensure => link,
  44. target => "/vagrant",
  45. notify => Service['apache2'],
  46. force => true
  47. }
  48.  
  49. file { '/etc/varnish':
  50. ensure => link,
  51. target => "/vagrant/etc/varnish",
  52. # notify => Service['varnish'],
  53. force => true
  54. }
  55.  
  56.  
  57. service { "varnish":
  58. ensure => running,
  59. require => Package["varnish"],
  60. }
  61.  
  62.  
  63. service { "apache2":
  64. ensure => running,
  65. require => Package["apache2"],
  66. }
  67.  
  68. }
  69.  
  70. service { "varnish":
  71. ensure => running,
  72. enable => true,
  73. hasrestart => true,
  74. hasstatus => true,
  75. status => '/usr/sbin/service varnish status | grep "is running"',
  76. require => Package["varnish"],
  77. }
  78.  
  79. $> sudo service <service_name> status
  80. $> echo $? //Make sure you are getting the correct return values that puppet expects.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement