Skip to content

Allow saz/sudo 10.x (fixes sudoversion fact on sudo-rs / Ubuntu 26.04) #16

Description

@dennisboege-devoba

Problem

metadata.json caps saz/sudo at < 9.0.0. On hosts with sudo-rs (Ubuntu 26.04), the sudoversion fact shipped with saz/sudo <= 9.0.2 fails on every agent run:

Error while resolving custom fact fact='sudoversion', resolution='<anonymous>': undefined method `[]' for nil:NilClass

The fact's regex only matches Sudo version, while sudo-rs reports sudo-rs <version>. This is fixed in saz/sudo v10.0.0 (saz/puppet-sudo#334, closes saz/puppet-sudo#335), which also adds Ubuntu 26.04 support.

Change

  • metadata.json: saz/sudo >=6.0.0 < 9.0.0 → >=6.0.0 < 11.0.0
  • .fixtures.yml: sudo ref 6.0.0 → 10.0.0 (optional, keeps unit tests on the version in use)

Base: feature/dpr/puppet-8.

No code change needed: the module only uses sudo::conf (manifests/client/monitor.pp) and passes ensure typed as Enum['present', 'absent'], which matches the new typed parameters.

Note for users

saz/sudo 10 adds types to the sudo::conf parameters (content: String[1] or Array[String[1]], priority: String[1] or Integer[0]). Hashes passed via the sudo monitor option are forwarded unchanged and must comply, otherwise catalog compilation fails.

Acceptance criteria

  • saz/sudo range in metadata.json updated
  • puppet agent -t --noop runs without the fact error on a sudo-rs host
  • puppet agent -t --noop stays clean on an existing host per OS family

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions