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 appreciated.

If the machine is joined to our internal domain it will use a file 
resource, if external i am using a invoke-webrequest as the file is on 
azure blob storage.
  

  $file_source = lookup('application.client')

  if $facts['domain'] == 'internal' {
    file { 'sccm_setup':
      path    => 'C:/Windows/ccmsetup/ccmsetup.exe',
      source  => "$file_source /file.exe"
    }
  }
  elsif $facts['domain'] != 'internal' {
    exec { 'client_setup':
      command => 'Invoke-WebRequest "$$file_source/file.exe " -outfile 
"C:/Windows/dir/file.exe" ',
      provider => powershell,
      creates => 'C:/Windows/dir/file.exe'
    }
  }
 package { 'client_package':
}

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/67ccb8fe-8479-405a-adf0-64fa9347faf2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to