lgproxy.pp 1.5 KB

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