Bug #6494

Augeas defvar (def*?) does not appear to be supported in Puppet

Added by Justin Honold about 1 year ago. Updated 11 months ago.

Status:Closed Start date:02/25/2011
Priority:Normal Due date:
Assignee:Nigel Kersten % Done:

0%

Category:augeas
Target version:2.7.0
Affected Puppet version:2.6.4 Branch:https://github.com/domcleal/puppet/tree/tickets/master/6494
Keywords:
Votes: 1

Description

RHEL5 host, puppet-0.25.5-1.el5 and ruby-augeas-0.3.0-1.el5 packages from the EPEL repository.

Per the 2009-06-05 commit at http://tinyurl.com/4w6ssjf , it looks like defvar is supported in 0.3.0.

Example manifest code:

bondprobe { [ "bond0", "bond1" ]: }

define bondprobe() {
  augeas { "bondprobe-$name":
    context => "/files/etc/modprobe.conf",
    changes => [
      "defvar nomatch '.[count(alias[. = \"$name\"]) = 0]'",
      "set \$nomatch/alias[last()+1] $name",
      "defvar match '/files/etc/modprobe.conf/alias[. = \"$name\"]'",
      "set \$match/modulename bonding"
    ],
  }
}

Returned error:

err: /Stage[main]/test-server/Bondprobe[bond0]/Augeas[bondprobe-bond0]: Failed to retrieve current state of resource: Unknown command defvar

Related issues

duplicated by Puppet - Feature #2754: augeas type suport for mv command in changes Duplicate 10/26/2009

History

Updated by Justin Honold about 1 year ago

aaaaaand I filed this under documentation :)

Can somebody move this to the main Puppet project, or does it need to be duplicated?

Updated by James Turnbull about 1 year ago

  • Project changed from Puppet Documentation to Puppet

Updated by James Turnbull about 1 year ago

  • Category set to augeas
  • Status changed from Unreviewed to Needs Decision
  • Assignee set to Bryan Kearney
  • Affected Puppet version set to 2.6.4

Updated by Dominic Cleal about 1 year ago

  • Branch set to https://github.com/domcleal/puppet/tree/tickets/master/6494

The lack of some of the new commands has been bugging me too, so I’ve added support for defvar, defnode, setm and mv. Currently setm is only available in the unreleased ruby-augeas tree, it isn’t included in ruby-augeas 0.3.0 so simply won’t work for the time being.

Commits are on my github branch and posted to -dev.

Updated by James Turnbull about 1 year ago

  • Status changed from Needs Decision to In Topic Branch Pending Review
  • Assignee changed from Bryan Kearney to Nigel Kersten

Updated by James Turnbull about 1 year ago

  • Target version set to 2.6.x

Updated by Jesse Wolfe about 1 year ago

  • Status changed from In Topic Branch Pending Review to Merged - Pending Release
  • Target version changed from 2.6.x to 2.7.x

Merged into next as of commit:9290b2f990fd4b267b2eb0da719b8f320484c4d7

Updated by James Turnbull 11 months ago

  • Status changed from Merged - Pending Release to Closed
  • Target version changed from 2.7.x to 2.7.0

Also available in: Atom PDF