如果之前安装了旧版本,如何使用 puppet 更新 windows 包?

How do you update a windows package using puppet, when older version is previously installed?

我的人偶模块能够在任何 windows 机器上安装 msi,前提是没有问题。然而,问题是,当我去更新模块并放入更新版本时,它停留在以前的版本上,而不是安装更新版本。这是区块

   package { 'AWS Command Line Interface':
       ensure          => "${awscli_version_for_install_windows}",
       provider        => 'windows',
       source          => "c:\windows\temp\AWSCLI_${awscli_version_for_install_windows}.msi",
       install_options => ['/qn', '/norestart', '/l*v', 'c:\windows\temp\awscli.log'],
     }

大家好,我真的找到了解决方法。在 install_options 命令中,您需要包含“REINSTALLMODE=AMUS”

package { 'AWS Command Line Interface':
       ensure          => "${awscli_version_for_install_windows}",
       provider        => 'windows',
       source          => "c:\windows\temp\AWSCLI_${awscli_version_for_install_windows}.msi",
       install_options => ['/qn', ‘REINSTALLMODE=AMUS’, '/norestart', '/l*v', 'c:\windows\temp\awscli.log'],
 }