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

exec unless/onlyif only try once, even if tries is specified

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Won't Fix
    • Affects Version/s: PUP 3.8.3
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Template:

      Description

      exec { 'test':
        path        => '/bin:/usr/bin:/usr/local/bin',
        tries       => 5,
        command     => '/bin/true',
        onlyif        => '/bin/false',
      }
      

      This should be try onlyif 5 times until it manages to return true. If after $tries tries the exit code is nonzero, it should skip running the command. However, onlyif is evaluated exactly once.

        Attachments

          Activity

            People

            Assignee:
            kylo Kylo Ginsberg
            Reporter:
            mattymo Matthew Mosesohn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support