On 01/02/13 10:35, "Schöke, Karsten" wrote:
> Hallo,
>
>
>
> I have a problem to include augeas…
>
> I will to change a comment to a entry in /etc/default/tmpfs in Debian
> Wheezy.
>
> The comment is
>
> #RAMTMP=no
>
>
>
> I try this on augtool und it is running:
>
> augtool> defvar ramtmpcomment
> /files/etc/default/tmpfs/#comment[.=~regexp('RAMTMP=no')]
>
> augtool> ins RAMTMP after $ramtmpcomment
>
> augtool> set /files/etc/default/tmpfs/RAMTMP yes
>
> augtool> rm $ramtmpcomment
>
>
>
> After I running this the entry is correct.
>
>
>
> But, I try this on puppet:
>
> augeas {"tmpfs":
>
> context => "/files/etc/default/tmpfs",
>
> changes => [
>
> "defvar ramtmpcomment #comment[.=~regexp('RAMTMP=no')]",
>
> "ins RAMTMP after $ramtmpcomment",
You should use single quotes here, or escape the variable name with
\$ramtmpcomment. Puppet will be interpolating the variable itself
rather than letting Augeas do it.
--
Dominic Cleal
Red Hat Engineering
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.