lgproxy.pp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # Module:: public::lookingglass
  2. # Manifest:: lgproxy.pp
  3. # Sources
  4. # git clone https://github.com/sileht/bird-lg -C /opt/
  5. class public::lookingglass::lgproxy {
  6. user { 'lgproxy':
  7. ensure => present,
  8. system => true,
  9. }
  10. file { '/etc/systemd/system/lgproxy.service':
  11. ensure => file,
  12. owner => root,
  13. group => staff,
  14. mode => '0755',
  15. source => 'puppet:///modules/public/lookingglass/lgproxy/lgproxy.service',
  16. notify => Service['lgproxy'],
  17. require => User['lgproxy'],
  18. }
  19. service { 'lgproxy':
  20. ensure => running,
  21. enable => true,
  22. require => File['/etc/systemd/system/lgproxy.service'],
  23. }
  24. file { '/opt/bird-lg/':
  25. ensure => directory,
  26. owner => root,
  27. group => staff,
  28. mode => '0755',
  29. }
  30. file { '/opt/bird-lg/lgproxy.cfg':
  31. ensure => file,
  32. owner => root,
  33. group => staff,
  34. mode => '0644',
  35. source => "puppet:///modules/private/lookingglass/lgproxy/lgproxy-${hostname}.cfg",
  36. notify => Service['lgproxy'],
  37. }
  38. file { '/opt/bird-lg/lgproxy.py':
  39. ensure => file,
  40. owner => root,
  41. group => staff,
  42. mode => '0755',
  43. notify => Service['lgproxy'],
  44. require => [
  45. Package['bird6'],
  46. Package['bird'],
  47. ],
  48. }
  49. file { [ '/var/run/bird/bird6.ctl', '/var/run/bird/bird.ctl' ]:
  50. owner => 'root',
  51. group => 'lgproxy',
  52. require => [
  53. Package['bird6'],
  54. Package['bird'],
  55. ],
  56. }
  57. }