On Fri, Nov 14, 2014 at 3:21 AM, Tiemen Ruiten <[email protected]> wrote:
>
>
> Hello,
>
> This is my first post on this group, so apologies if this has been asked
> before.
>
> I'm trying to debug why a puppet agent on a Windows 7 node is not doing
> what I think it's supposed to be doing:
>
> I have installed the rismoney-chocolatey and puppetlabs-powershell
> providers and have two classes, packages::chocolatey and
> packages::workstation.
>
> in /etc/puppet/environments/common/packages/manifests/chocolatey.pp
>
> class packages::chocolatey {
> exec { "install-chocolatey":
> creates => 'C:\ProgramData\chocolatey',
> provider => 'powershell',
> command => 'iex ((new-object net.webclient).DownloadString(\'
> https://chocolatey.org/install.ps1\'))',
> }
> }
>
> This one works fine.
>
> and in /etc/puppet/environments/common/packages/manifests/workstation.pp
>
> class packages::workstation {
>
> package {
> 'vlc': ensure => 'installed',
> 'notepadplusplus': ensure => 'installed',
> }
> }
>
> This one doesn't work. The puppet agent runs without error, but the two
> packages are not installed! So I'm trying to find out what exactly puppet
> is doing, for example the output of the choco command that it's supposed to
> execute. I'm having a really hard time though finding any documentation or
> debug logging. How can I see what puppet is doing when it's running? I have
> attached the output of puppet --debug --onetime
>
Are you sure that class is included in the catalog, it doesn't appear
puppet ever tries to install those packages.
Also on windows the default package provider is `windows`, so to use
chocolatey, you need to specify `provider => chocolatey` in your package
resource or create a resource default.
Also, you'll want to make sure that your package resource requires the
'install-chocolatey' exec, so that those steps are performed in the correct
order.
>
>
>
> --
> 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/48f94cf0-0046-46a2-88b8-a4232c444f96%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/48f94cf0-0046-46a2-88b8-a4232c444f96%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
Josh Cooper
Developer, Puppet Labs
*Join us at **PuppetConf 2015, October 5-9 in Portland, OR - *
http://2015.puppetconf.com.
*Register early to save 40%!*
--
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/CA%2Bu97um9axF%3D7y3UszGnGRLk0FHdzYYdreJ3RR5T4H4Xn9eWrw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.