I think you need to double quote strings that contain variables. So try:
line => "INSTANCE=$instance",
-Steve
On Fri, Mar 28, 2014 at 1:58 PM, Matt Gieselman <[email protected]> wrote:
> Given the following snippet from an init.pp file:
>
> $instance = 22
>
> file_line { 'instance' :
>
> path => '/etc/init.d/myfile',
>
> line => 'INSTANCE=$instance',
>
> match => 'INSTANCE='
>
> }
>
> What I expect to happen is have the line in /etc/init.d/myfile change from
> INSTANCE=1 to INSTANCE=22, what happens is the file has INSTANCE=$instance
> any suggestions?
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/879ed188-481d-4c25-805c-acd5ce1b3a85%40googlegroups.com<https://groups.google.com/d/msgid/puppet-users/879ed188-481d-4c25-805c-acd5ce1b3a85%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/CANVRfYqpXnazJ%2BhyTHVhHy6C_pFB9qBK_Es6E2a8pObgrsU8UA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.