The Puppet Labs Issue Tracker has Moved:

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using See the following page for information on filing tickets with JIRA:

Feature #1630

exec type should allow passing of arguments as an array rather than a string

Added by Sam Quigley about 7 years ago. Updated over 1 year ago.

Status:AcceptedStart date:10/04/2008
Priority:NormalDue date:
Assignee:-% Done:


Target version:-
Affected Puppet version:0.24.4 Branch:

We've Moved!

Ticket tracking is now hosted in JIRA:

This ticket is now tracked at:


The exec type takes commands and arguments as a string, (@“echo foo”@) which will then get passed to /bin/sh (@sh -c “echo foo”@) by Kernel#system.

This can make things pretty awkward if the command you’re trying to execute contains shell metacharacters or quotes of its own, and under appropriately pathological conditions could even be a security problem… (username ‘“&&rm -rf /’ or something? shrug)

It’d be grand if the exec type would support passing things around as arrays. eg:

exec {"example":
  command => "/bin/echo",
  arguments => ["*", "yay", "*"],

(Passing an array to Kernel#system bypasses the shell completely:


Related issues

Related to Puppet - Bug #19697: giving an array as the command parameter of exec throws a... Duplicate
Related to Puppet - Bug #6553: handling of array values in exec provider is inconsistent. Accepted 03/02/2011


#1 Updated by James Turnbull about 7 years ago

  • Category set to exec
  • Status changed from Unreviewed to Needs Decision
  • Assignee set to Luke Kanies

#2 Updated by Luke Kanies about 7 years ago

  • Status changed from Needs Decision to Accepted
  • Assignee changed from Luke Kanies to Puppet Community

#3 Updated by James Turnbull over 6 years ago

  • Assignee deleted (Puppet Community)

#4 Updated by Stefan Schulte over 4 years ago

I guess that is fixed now along with #4884?

#5 Updated by Charlie Sharpsteen over 2 years ago

Bi-yearly followup: specifying the command attribute of exec resources as an Array was not implemented in #4884.

#6 Updated by Kevin Cox over 1 year ago

Redmine Issue #1630 has been migrated to JIRA:

Also available in: Atom PDF