Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-11067

Specifying purge_ssh_keys parameter for non-existing user errors out

    XMLWordPrintable

Details

    • Other
    • Night's Watch
    • 2
    • NW - 2021-06-02, NW - 2021-06-16
    • Customer Feedback
    • Bug Fix
    • Prioritizes the `ensure` property of a managed user before the `purge_ssh_keys` parameter to avoid errors when the user doesn't already exist.
    • Needs Assessment

    Description

      Puppet Version: 7.6.1
      Puppet Server Version: N/A - reproducible via local puppet apply
      OS Name/Version: Ubuntu 20.04 (LTS "Focal")


      A user resource, with purge_ssh_keys parameter provided as either true or as an array of paths results in a "Failed to apply catalog" error, if the user account does not previously exist.

      $ puppet apply -e 'user { "test123": ensure => present, purge_ssh_keys => true, }' --noop
      

      Desired Behavior:

      User account is created, with SSH keys as provided.
      SSH key purging for user is enforced following creation.

      Actual Behavior:

      Notice: Compiled catalog for host.example.com in environment production in 0.02 seconds
      Error: Parameter purge_ssh_keys failed on User[test123]: Munging failed for value true in class purge_ssh_keys: user test123 doesn't exist (line: 1)
      

      Attachments

        Issue Links

          Activity

            People

              luchian.nemes Luchian Nemes
              sigv Valters Jansons
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support