|
2 | 2 | 'windows': {
|
3 | 3 | Package {
|
4 | 4 | provider => chocolatey,
|
5 |
| - source => 'C:\vagrant\resources\packages', |
| 5 | + #source => 'C:\vagrant\resources\packages', |
6 | 6 | }
|
7 | 7 | }
|
8 | 8 | }
|
9 | 9 |
|
10 |
| -include chocolateyserver |
| 10 | +include chocolatey |
| 11 | +# or |
| 12 | +# class {'chocolatey': |
| 13 | +# chocolatey_download_url => 'file:///C:/vagrant/resources/packages/chocolatey.0.9.9.11.nupkg', |
| 14 | +# use_7zip => false, |
| 15 | +# log_output => true, |
| 16 | +# } |
| 17 | + |
| 18 | +exec { 'Write Path': |
| 19 | + command => 'Write-Output $env:PATH', |
| 20 | + provider => powershell, |
| 21 | + logoutput => true |
| 22 | +} |
| 23 | + |
| 24 | +exec { 'Write Posh Location': |
| 25 | + command => 'get-process powershell* | %{ Write-Host $($_.Path)}', |
| 26 | + provider => powershell, |
| 27 | + logoutput => true |
| 28 | +} |
| 29 | + |
| 30 | +exec { 'Write Path exit 0': |
| 31 | + command => 'Write-Output $env:PATH; exit 0', |
| 32 | + provider => powershell, |
| 33 | + logoutput => true |
| 34 | +} |
| 35 | + |
| 36 | +exec { 'Write Path unless 1': |
| 37 | + command => 'Write-Output $env:PATH; exit 0', |
| 38 | + unless => 'Write-Output "Yo"; exit 1', |
| 39 | + provider => powershell, |
| 40 | + logoutput => true |
| 41 | +} |
| 42 | + |
| 43 | +exec { 'Write Path unless 0': |
| 44 | + command => 'Write-Output $env:PATH; exit 0', |
| 45 | + unless => 'Write-Output "Yo"; exit 0', |
| 46 | + provider => powershell, |
| 47 | + logoutput => true |
| 48 | +} |
11 | 49 |
|
| 50 | +exec { 'Write Path onlyif 1': |
| 51 | + command => 'Write-Output $env:PATH; exit 0', |
| 52 | + onlyif => 'Write-Output "Yo"; exit 1', |
| 53 | + provider => powershell, |
| 54 | + logoutput => true |
| 55 | +} |
| 56 | + |
| 57 | +exec { 'Write Path onlyif 0': |
| 58 | + command => 'Write-Output $env:PATH; exit 0', |
| 59 | + onlyif => 'Write-Output "Yo"; exit 0', |
| 60 | + provider => powershell, |
| 61 | + logoutput => true |
| 62 | +} |
| 63 | + |
| 64 | +exec { 'Set Temp Env': |
| 65 | + command => '$env:PATHTEMP="123"', |
| 66 | + provider => powershell, |
| 67 | + logoutput => true |
| 68 | +} -> |
| 69 | + |
| 70 | +exec { 'Write Temp Env': |
| 71 | + command => 'Write-Output "PATHTEMP=$($env:PATHTEMP) (should be empty)"', |
| 72 | + provider => powershell, |
| 73 | + logoutput => true |
| 74 | +} |
| 75 | + |
| 76 | +# add windows features |
| 77 | +windowsfeature { 'Web-WebServer': |
| 78 | + installmanagementtools => true, |
| 79 | +} -> |
| 80 | +windowsfeature { 'Web-Asp-Net45': |
| 81 | +} -> |
| 82 | + |
| 83 | +# remove default web site |
| 84 | +iis::manage_site {'Default Web Site': |
| 85 | + ensure => absent, |
| 86 | + site_path => 'any', |
| 87 | + app_pool => 'DefaultAppPool' |
| 88 | +} -> |
| 89 | + |
| 90 | +# application in iis |
| 91 | +iis::manage_app_pool { 'newpool': |
| 92 | + enable_32_bit => true, |
| 93 | + managed_runtime_version => 'v4.0', |
| 94 | +} -> |
| 95 | +iis::manage_site {'The Server': |
| 96 | + site_path => 'c:/inetpub/wwwroot', |
| 97 | + port => "80", |
| 98 | + ip_address => '*', |
| 99 | + app_pool => "newpool", |
| 100 | +} |
12 | 101 | # package {'roundhouse':
|
13 | 102 | # ensure => '0.8.5.0',
|
14 | 103 | # }
|
|
0 commit comments