When sending the configuration to the puppet agent, I get an error

87 views Asked by At

When sending the configuration to the agent, I get an error Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, no implicit conversion of String into Integer (file:/etc/puppetlabs/code/environments/production/modules/accounts/manifests/init.pp, line: 24, column: 24) on node


init.pp

**# See README.md for details.**
class accounts(
  $groups                   = {},
  $groups_membership        = undef,
  $ssh_keys                 = {},
  $users                    = {},
  $usergroups               = {},
  $accounts                 = {},
  $start_uid                = undef,
  $start_gid                = undef,
  $purge_ssh_keys           = false,
  $ssh_authorized_key_title = '%{ssh_key}-on-%{account}',
  $shell                    = undef,
  $managehome               = true,
  $forcelocal               = true,
) {
  include ::accounts::config

  create_resources(group, $groups)

  create_resources(accounts::account, $accounts)

**  # Remove users marked as absent**
  $absent_users = keys(absents($users))
   user { $absent_users:
    ensure     => absent,
    managehome => $managehome,
    forcelocal => $forcelocal,
  }
}

_______________________________________________________________________________________________

I'm new to puppet and using it together with foreman

Puppet master version 7.2.0 Puppet agent version 6.27.0 Foreman version 3.4.0

All settings were made in Foreman. Manifests, like any other changes, were not made in the console.

0

There are 0 answers