-1

New to puppet, so probably something simple. Cannot understand why the below manifest does not work. When run on an agent I get the following error:

Could not parse for environment production: Syntax error at '='; expected '}' at /etc/puppet/manifests/site.pp:14

node 'linuxlab' {

include apt

apt::unattended_upgrades {
  origins             = $::apt::params::origins,
  update              = '1',
  download            = '1',
  upgrade             = '1',
  autoclean           = '7',
}

}
1

You don't use = to pass parameters to a class.
=> is used for that.
= is used to assign values to variables.
So that code should be changed to:

node 'linuxlab' {

  include apt

  apt::unattended_upgrades {
    origins             => $::apt::params::origins,
    update              => '1',
    download            => '1',
    upgrade             => '1',
    autoclean           => '7',
  }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.