Thanks Michael,
What i ended up having to do was create a separate powershell process then
run invoke-webrequest there because start-process allows for -wait.
exec { 'client_setup':
command => '(Start-Process powershell -ArgumentList (Invoke-WebRequest
"Invoke-WebRequest
You should be able to add a require => Package['client_package'] parameter
to the exec resource to resolve this. For example:
$file_source = lookup('application.client')
if $facts['domain'] == 'internal' {
file { 'sccm_setup':
path=> 'C:/Windows/ccmsetup/ccmsetup.exe',
Thanks Michael,
I think my problem is not syntax but rather the invoke-webrequest is not
actually completing before moving to the package resource. Then as the file
doesnt exist the run fails.
Back to drawing board.
Appreciate the quick reply.
On Tuesday, September 11, 2018 at 7:27:49 AM
What you have there looks fine but I would change the elsif to an else
statement.
On Tuesday, September 11, 2018 at 8:08:53 AM UTC-4, Jason McMahan wrote:
>
> Good day,
> I am attempting to add require to an if statement and not sure i am doing
> it right. Any help would be greatly