andre_guilhon

powers-0003

Jun 17th, 2016
395
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. node 'POWERS-Soldier-0003' {
  2.     include chocolatey
  3.     package { 'zabbix-agent':
  4.         ensure   => '2.4.4',
  5.         provider => 'chocolatey',
  6.     }
  7.     package { 'firefox':
  8.     ensure => '45.0.1',
  9.     provider => 'chocolatey',
  10.    
  11.     }
  12.     package { 'javaruntime':
  13.     ensure => '8.0.73',
  14.         provider => chocolatey,
  15.     }
  16.     file { 'c:/PWuX/':
  17.         ensure => 'directory',
  18.     source_permissions => ignore,
  19.     }
  20.     file { 'C:/PWuX/lib':
  21.     source => "puppet:///modules/powers-pwux/GMail/dist/lib",
  22.     recurse => true,
  23.     purge =>true,
  24.     require => File['c:/PWuX'],
  25.     source_permissions => ignore,
  26.     }
  27.     file { 'C:/PWuX/FirefoxProfile/':
  28.     ensure  => directory,
  29.     links   => follow,
  30.     source  => "puppet:///modules/powers-pwux/FirefoxProfile/",
  31.     recurse => remote,
  32. #   require => File['c:/PWuX'],
  33.     source_permissions => ignore,
  34.     }
  35.     file { 'C:/PWuX/GMail.jar':
  36.     ensure => present,
  37.     source => "puppet:///modules/powers-pwux/GMail/dist/GMail.jar",
  38.     require => File['c:/PWuX'],
  39.     source_permissions => ignore,
  40.     }
  41.     file { 'C:/PWuX/host.txt':
  42.     ensure => present,
  43.     content => 'POWERS-Soldier-0003',
  44.     require => File['c:/PWuX'],
  45.     source_permissions => ignore,
  46.     }
  47. ######Corrigir a quebra de linhas.
  48.     file { 'c:/PWuX/inicia_testes.bat':
  49.     ensure => present,
  50.     content => "
  51. java -jar c:\PWuX\Clientes.jar hospital-santa-isabel ihc kepler koerich languiru parati portobello quantity sdp sea sicoob sim stara termotecnica tigre uninter unisul videplast weg
  52.     require => File['c:/PWuX'],
  53.     source_permissions => ignore,
  54.    }
  55.    file { 'C:/PWuX/inicia_testes.vbs':
  56.        ensure => present,
  57.        content => "Dim WinScriptHost
  58. Set WinScriptHost = CreateObject(\"WScript.Shell\")
  59. WinScriptHost.Run \"c:\PWuX\inicia_testes.bat\", 0,1
  60. Set WinScriptHost = Nothing",
  61.         require => File['c:/PWuX/inicia_testes.bat'],
  62.         source_permissions => ignore,
  63.  
  64.     }
  65.  
  66.     file { 'C:/PWuX/Yahoo.jar':
  67.     ensure => present,
  68.     source => "puppet:///modules/powers-pwux/Yahoo/dist/Yahoo.jar",
  69.     require => File['c:/PWuX'],
  70.     source_permissions => ignore,
  71.     }
  72.     file { 'C:/PWuX/lib/PWuXUtils.jar':
  73.         ensure => present,
  74.         source => "puppet:///modules/powers-pwux/PWuXUtils/dist/PWuXUtils.jar",
  75.         require => File['c:/PWuX'],
  76.         source_permissions => ignore,
  77.     }
  78.    
  79.     file { 'C:/PWuX/CreateParameters.jar':
  80.     ensure => present,
  81.     source => "puppet:///modules/powers-pwux/CreateParameters/dist/CreateParameters.jar",
  82.     require => File['c:/PWuX'],
  83.     source_permissions => ignore,
  84.     }
  85.     scheduled_task { 'PWuX Schedule':
  86.         ensure    => present,
  87.         enabled   => true,
  88.         command   => 'C:\WINDOWS\system32\cmd.exe',
  89.     arguments => '/c start "" /min "C:\PWuX\inicia_testes.vbs"',
  90.     user      => 'powers',
  91.         trigger   => {
  92.             schedule   => daily,
  93.             every      => 1,            # Specifies every other day. Defaults to 1 (every day).
  94.             start_date => '2011-08-31', # Defaults to 'today'
  95.             start_time => '08:00',      # Must be specified
  96.             minutes_interval => '1',   # Repeat this task every 5 minutes
  97.         }
  98.     }
  99.     user {'powers':
  100.     name      => 'powers',
  101.         ensure    => present,
  102.         groups    => ['Users','Administrators'],
  103.         password  => 'Tcmda@2013',
  104.         managehome => true,
  105.     }
  106.     file { 'C:/PWuX/PWuX-FUSESC-custom-AutoAtendimento.jar':
  107.         ensure => 'present',
  108.         source => 'puppet:///modules/powers-pwux/PWuX-FUSESC-custom-AutoAtendimento/dist/PWuX-FUSESC-custom-AutoAtendimento.jar',
  109.         require => File['c:/PWuX'],
  110.         source_permissions => ignore,
  111.     }
  112.     file { 'C:/PWuX/PWuX-FUSESC-custom-AutoAtendimento-Extrato.jar':
  113.         ensure => 'present',
  114.         source => 'puppet:///modules/powers-pwux/PWuX-FUSESC-custom-AutoAtendimento-Extrato/dist/PWuX-FUSESC-custom-AutoAtendimento-Extrato.jar',
  115.         require => File['c:/PWuX'],
  116.         source_permissions => ignore,
  117.     }
  118.     file { 'C:/PWuX/PWuX-FUSESC-custom-ECM-documento.jar':
  119.         ensure => 'present',
  120.         source => 'puppet:///modules/powers-pwux/PWuX-FUSESC-custom-ECM-documento/dist/PWuX-FUSESC-custom-ECM-documento.jar',
  121.         require => File['c:/PWuX'],
  122.         source_permissions => ignore,
  123.     }
  124.     file { 'C:/PWuX/PWuX-FUSESC-custom-ECM-licenciamento.jar':
  125.         ensure => 'present',
  126.         source => 'puppet:///modules/powers-pwux/PWuX-FUSESC-custom-ECM-licenciamento/dist/PWuX-FUSESC-custom-ECM-licenciamento.jar',
  127.         require => File['c:/PWuX'],
  128.         source_permissions => ignore,
  129.     }
  130.     file { 'C:/PWuX/PWuX-CELESC-custom-AgenciaWeb.jar':
  131.         ensure => 'present',
  132.         source => 'puppet:///modules/powers-pwux/PWuX-CELESC-custom-AgenciaWeb/dist/PWuX-CELESC-custom-AgenciaWeb.jar',
  133.         require => File['c:/PWuX'],
  134.         source_permissions => ignore,
  135.     }
  136.     file { 'C:/PWuX/PWuX-CELESC-custom-Licitacoes.jar':
  137.         ensure => 'present',
  138.         source => 'puppet:///modules/powers-pwux/PWuX-CELESC-custom-Licitacoes/dist/PWuX-CELESC-custom-Licitacoes.jar',
  139.         require => File['c:/PWuX'],
  140.         source_permissions => ignore,
  141.     }
  142.     file { 'C:/PWuX/PWuX-custom-JFSC-eproc.jar':
  143.         ensure => 'present',
  144.         source => 'puppet:///modules/powers-pwux/PWuX-custom-JFSC-eproc/dist/PWuX-custom-JFSC-eproc.jar',
  145.         require => File['c:/PWuX'],
  146.         source_permissions => ignore,
  147.     }
  148.     file { 'C:/PWuX/Clientes.jar':
  149.         ensure => 'present',
  150.         source => 'puppet:///modules/powers-pwux/Clientes/dist/Clientes.jar',
  151.         require => File['c:/PWuX'],
  152.         source_permissions => ignore,
  153.     }
  154.  
  155. }
RAW Paste Data