Guest User

Untitled

a guest
Jun 21st, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.53 KB | None | 0 0
  1. class interactive_server {
  2. #
  3. # Install keys for the proper pool
  4. #
  5. case $hostgroup {
  6. "sunpool": {
  7. remotefile {
  8. "/etc/ssh/ssh_host_dsa_key":
  9. owner => root, group => root, mode => 400, notify => Service["sshd"],
  10. source => "ssh/files/keys/sunpool.domain.tld-ssh_host_dsa_key";
  11. "/etc/ssh/ssh_host_key":
  12. owner => root, group => root, mode => 400, notify => Service["sshd"],
  13. source => "ssh/files/keys/sunpool.domain.tld-ssh_host_key";
  14. "/etc/ssh/ssh_host_rsa_key":
  15. owner => root, group => root, mode => 400, notify => Service["sshd"],
  16. source => "ssh/files/keys/sunpool.domain.tld-ssh_host_rsa_key";
  17. "/etc/ssh/ssh_host_dsa_key.pub":
  18. owner => root, group => root, mode => 444, notify => Service["sshd"],
  19. source => "ssh/files/keys/sunpool.domain.tld-ssh_host_dsa_key.pub";
  20. "/etc/ssh/ssh_host_key.pub":
  21. owner => root, group => root, mode => 444, notify => Service["sshd"],
  22. source => "ssh/files/keys/sunpool.domain.tld-ssh_host_key.pub";
  23. "/etc/ssh/ssh_host_rsa_key.pub":
  24. owner => root, group => root, mode => 444, notify => Service["sshd"],
  25. source => "ssh/files/keys/sunpool.domain.tld-ssh_host_rsa_key.pub";
  26. }
  27. }
  28. }
  29. #
  30. # Implement cronjobs
  31. #
  32. cron {
  33. killScriptXxxxxx:
  34. command => '/usr/local/bin/scriptname -k Xxxxxx.exe',
  35. user => root, minute => [ 9, 24, 39, 54 ], ensure => present;
  36. killScriptXxxxXxxx:
  37. command => '/usr/local/bin/scriptname -k XxxxXxxx',
  38. user => root, minute => [ 10, 25, 40, 55 ], ensure => present;
  39. killScriptXxxxXxxxXxx:
  40. command => '/usr/local/bin/scriptname -k XxxxXxxxXxx',
  41. user => root, minute => [ 11, 26, 41, 56 ], ensure => present;
  42. }
  43. #
  44. # Implement platform specific actions
  45. #
  46. case $operatingsystem {
  47. redhat: {
  48. #
  49. # include buildPasswd.sh
  50. #
  51. include scripts::buildPasswd
  52.  
  53. #
  54. # Enforce 'stock' /etc/security/limits.conf
  55. #
  56. remotefile {
  57. "/etc/security/limits.conf":
  58. mode => 444, source => "etc/security/limits.conf";
  59. }
  60.  
  61. #
  62. # Increased semaphores on running system, due to problem with 128.
  63. #
  64. exec { "sysctlKernelSem":
  65. command => '/sbin/sysctl -w kernel.sem="250 32000 32 256"',
  66. unless => "/sbin/sysctl kernel.sem | grep 256";
  67. }
  68.  
  69. #
  70. # Increased semaphores in sysctl.conf, due to problem with 128.
  71. #
  72. ensure_key_value { "sysctl.conf":
  73. key => "kernel.sem", delimiter => " = ",
  74. value => "250 32000 32 256", file => "/etc/sysctl.conf";
  75. }
  76.  
  77. #
  78. # 32 bit only actions
  79. #
  80. case $hardwaremodel {
  81. i686: {
  82. #
  83. # Implement cronjobs
  84. #
  85. cron {
  86. # 8,23,38,53 * * * * /usr/local/bin/scriptname -k xxxXxxXxxxx
  87. killScriptXxxXxxXxxxx:
  88. command => '/usr/local/bin/scriptname -k xxxXxxXxxxx',
  89. user => root, minute => [ 8,23,38,53 ], ensure => present;
  90. }
  91. }
  92. }
  93. }
  94. solaris: {
  95.  
  96. #
  97. # Implement cronjobs (xxx)
  98. #
  99. cron {
  100. killScriptGet:
  101. command => '/usr/local/bin/hungjob get > /dev/null 2>&1',
  102. user => root, minute => [ 9, 24, 39, 55 ], ensure => present;
  103. killScriptXXXx:
  104. command => '/usr/local/bin/scriptname -k xxx',
  105. user => root, minute => [ 13, 28, 43, 58 ], ensure => present;
  106. killScriptXxxxxx:
  107. command => '/usr/local/bin/scriptname -k xxxxx',
  108. user => root, minute => [ 14, 29, 44, 59 ], ensure => present;
  109. killScriptXxxxxxxx:
  110. command => '/usr/local/bin/scriptname -k xxxxxxx',
  111. user => root, minute => [ 15, 30, 45, 0 ], ensure => present;
  112. }
  113. }
  114. }
  115. }
Add Comment
Please, Sign In to add comment