lgproxy.pp 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. package { [ 'python-dnspython', 'python-pydot', 'python-flask' ]:
  7. ensure => installed,
  8. }
  9. user { 'lgproxy':
  10. ensure => present,
  11. system => true,
  12. }
  13. file { '/etc/systemd/system/lgproxy.service':
  14. ensure => file,
  15. owner => root,
  16. group => staff,
  17. mode => '0755',
  18. source => 'puppet:///modules/public/lookingglass/lgproxy/lgproxy.service',
  19. notify => Service['lgproxy'],
  20. require => User['lgproxy'],
  21. }
  22. service { 'lgproxy':
  23. ensure => running,
  24. enable => true,
  25. require => File['/etc/systemd/system/lgproxy.service'],
  26. }
  27. file { '/opt/bird-lg/':
  28. ensure => directory,
  29. owner => root,
  30. group => staff,
  31. mode => '0755',
  32. }
  33. file { '/var/log/bird-lg/':
  34. ensure => directory,
  35. owner => 'lgproxy',
  36. group => staff,
  37. mode => '0755',
  38. }
  39. file { '/opt/bird-lg/lgproxy.cfg':
  40. ensure => file,
  41. owner => root,
  42. group => staff,
  43. mode => '0644',
  44. source => "puppet:///modules/private/lookingglass/lgproxy/lgproxy-${hostname}.cfg",
  45. notify => Service['lgproxy'],
  46. }
  47. file { '/opt/bird-lg/lgproxy.py':
  48. ensure => file,
  49. owner => root,
  50. group => staff,
  51. mode => '0755',
  52. notify => Service['lgproxy'],
  53. #require => [
  54. # Package['bird6'],
  55. # Package['bird'],
  56. #],
  57. }
  58. file { [ '/var/run/bird/bird6.ctl', '/var/run/bird/bird.ctl' ]:
  59. owner => 'root',
  60. group => 'lgproxy',
  61. #require => [
  62. # Package['bird6'],
  63. # Package['bird'],
  64. #],
  65. }
  66. }