fmw_extract.pp 705 B

1234567891011121314151617181920212223242526272829303132
  1. #
  2. # fmw_opatch::internal::fmw_extract
  3. #
  4. # Copyright 2015 Oracle. All Rights Reserved
  5. #
  6. define fmw_opatch::internal::fmw_extract(
  7. $source_file = undef,
  8. $os_user = undef,
  9. $os_group = undef,
  10. $tmp_dir = undef,
  11. )
  12. {
  13. $path = '/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin'
  14. if !defined(Package['unzip']) {
  15. package{ 'unzip':
  16. ensure => present,
  17. }
  18. }
  19. exec{ "extract ${title}":
  20. command => "unzip -o ${source_file} -d ${tmp_dir}",
  21. creates => "${tmp_dir}/${title}",
  22. user => $os_user,
  23. group => $os_group,
  24. cwd => $tmp_dir,
  25. path => $path,
  26. timeout => 0,
  27. require => Package['unzip'],
  28. }
  29. }