voxpupuli / puppet-augeasproviders_sysctl

Augeas-based sysctl type and provider for Puppet
Apache License 2.0
10 stars 36 forks source link

Could not evaluate: undefined method `[]' for nil:NilClass #81

Closed hboetes closed 1 year ago

hboetes commented 1 year ago

Affected Puppet, Ruby, OS and module versions/distributions

How to reproduce (e.g Puppet code you use)

  sysctl { 'kernel.yama.ptrace_scope':
    ensure => present,
    value  => '0',
    target => '/etc/sysctl.d/10-ptrace.conf',
    comment => 'Closes #24182',
  }

  sysctl { 'kernel.core_pattern':
    ensure => present,
    value  => 'core-%p-%E',
    target => '/etc/sysctl.d/10-core_pattern.conf',
    comment => 'Closes #28134',
  }

What are you seeing

Error: /Stage[main]/Buildhost/Sysctl[kernel.yama.ptrace_scope]: Could not evaluate: undefined method `[]' for nil:NilClass
Error: /Stage[main]/Buildhost/Sysctl[kernel.core_pattern]: Could not evaluate: undefined method `[]' for nil:NilClass

What behaviour did you expect instead

Output log

Any additional information you'd like to impart

hboetes commented 1 year ago

ok, scratch that. Updating the rest of the modules fixed the issue.