Amos Shapira
2010-Aug-25 06:52 UTC
[Puppet Users] quoting special characters in puppet.conf
Hello, I''d like to pass the following flags to diff through puppet: -urbB -I $Id -I $HeadURL -I $URL But when I try to set diff_args in /etc/puppet/puppet.conf like this: diff_args = -ubB -I \$Id -I \$HeadURL -I \$URL Puppet tries to interpolate the $Id and fails. How can I quote the ''$'' sign so puppet will pass it as-is to diff? I''m using puppet 0.25.4 on CentOS 5.5 x64_86. Thanks. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Patrick
2010-Aug-25 08:28 UTC
Re: [Puppet Users] quoting special characters in puppet.conf
On Aug 24, 2010, at 11:52 PM, Amos Shapira wrote:> Hello, > > I''d like to pass the following flags to diff through puppet: > > -urbB -I $Id -I $HeadURL -I $URL > > But when I try to set diff_args in /etc/puppet/puppet.conf like this: > > diff_args = -ubB -I \$Id -I \$HeadURL -I \$URL > > Puppet tries to interpolate the $Id and fails. > > How can I quote the ''$'' sign so puppet will pass it as-is to diff? > > I''m using puppet 0.25.4 on CentOS 5.5 x64_86. > > Thanks. > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Amos Shapira
2010-Aug-25 11:35 UTC
[Puppet Users] Re: quoting special characters in puppet.conf
Patrick, I see only a quote of my question in your reply. Do you have an answer? Thanks. --Amos On Aug 25, 6:28 pm, Patrick <kc7...@gmail.com> wrote:> On Aug 24, 2010, at 11:52 PM, Amos Shapira wrote: > > > Hello, > > > I''d like to pass the following flags to diff through puppet: > > > -urbB -I $Id -I $HeadURL -I $URL > > > But when I try to set diff_args in /etc/puppet/puppet.conf like this: > > > diff_args = -ubB -I \$Id -I \$HeadURL -I \$URL > > > Puppet tries to interpolate the $Id and fails. > > > How can I quote the ''$'' sign so puppet will pass it as-is to diff? > > > I''m using puppet 0.25.4 on CentOS 5.5 x64_86. > > > Thanks. > > > -- > > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > > To post to this group, send email to puppet-users@googlegroups.com. > > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > > For more options, visit this group athttp://groups.google.com/group/puppet-users?hl=en.-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Tom Duckering
2010-Aug-25 13:15 UTC
Re: [Puppet Users] Re: quoting special characters in puppet.conf
I believe the escape character is simply \ I use it to escape quotes - \" On 25 Aug 2010, at 12:35, Amos Shapira wrote:> Patrick, > > I see only a quote of my question in your reply. > > Do you have an answer? > > Thanks. > > --Amos > > > On Aug 25, 6:28 pm, Patrick <kc7...@gmail.com> wrote: >> On Aug 24, 2010, at 11:52 PM, Amos Shapira wrote: >> >>> Hello, >> >>> I''d like to pass the following flags to diff through puppet: >> >>> -urbB -I $Id -I $HeadURL -I $URL >> >>> But when I try to set diff_args in /etc/puppet/puppet.conf like this: >> >>> diff_args = -ubB -I \$Id -I \$HeadURL -I \$URL >> >>> Puppet tries to interpolate the $Id and fails. >> >>> How can I quote the ''$'' sign so puppet will pass it as-is to diff? >> >>> I''m using puppet 0.25.4 on CentOS 5.5 x64_86. >> >>> Thanks. >> >>> -- >>> You received this message because you are subscribed to the Google Groups "Puppet Users" group. >>> To post to this group, send email to puppet-users@googlegroups.com. >>> To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. >>> For more options, visit this group athttp://groups.google.com/group/puppet-users?hl=en. > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Patrick
2010-Aug-25 16:37 UTC
Re: [Puppet Users] Re: quoting special characters in puppet.conf
Sorry. I must have pressed Send instead of Discard. I didn''t actually have anything to say. On Aug 25, 2010, at 4:35 AM, Amos Shapira wrote:> Patrick, > > I see only a quote of my question in your reply. > > Do you have an answer? > > Thanks. > > --Amos > > > On Aug 25, 6:28 pm, Patrick <kc7...@gmail.com> wrote: >> On Aug 24, 2010, at 11:52 PM, Amos Shapira wrote: >> >>> Hello, >> >>> I''d like to pass the following flags to diff through puppet: >> >>> -urbB -I $Id -I $HeadURL -I $URL >> >>> But when I try to set diff_args in /etc/puppet/puppet.conf like this: >> >>> diff_args = -ubB -I \$Id -I \$HeadURL -I \$URL >> >>> Puppet tries to interpolate the $Id and fails. >> >>> How can I quote the ''$'' sign so puppet will pass it as-is to diff? >> >>> I''m using puppet 0.25.4 on CentOS 5.5 x64_86. >> >>> Thanks. >> >>> -- >>> You received this message because you are subscribed to the Google Groups "Puppet Users" group. >>> To post to this group, send email to puppet-users@googlegroups.com. >>> To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. >>> For more options, visit this group athttp://groups.google.com/group/puppet-users?hl=en. > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Amos Shapira
2010-Aug-27 08:06 UTC
[Puppet Users] Re: quoting special characters in puppet.conf
Hi Tom, That''s what I tried but it doesn''t help. e.g. here is what I tested again right now: diff_args = -ubB -I \$HeadURL and here are the errors that I get: err: /File[/usr/lib64/nagios/plugins/check_state_file.pl]: Failed to retrieve current state of resource: Could not find value for $HeadURL Thanks, --Amos On Aug 25, 11:15 pm, Tom Duckering <tom.ducker...@gmail.com> wrote:> I believe the escape character is simply \ > > I use it to escape quotes - \" > > On 25 Aug 2010, at 12:35, Amos Shapira wrote: > > > Patrick, > > > I see only a quote of my question in your reply. > > > Do you have an answer? > > > Thanks. > > > --Amos > > > On Aug 25, 6:28 pm, Patrick <kc7...@gmail.com> wrote: > >> On Aug 24, 2010, at 11:52 PM, Amos Shapira wrote: > > >>> Hello, > > >>> I''d like to pass the following flags to diff through puppet: > > >>> -urbB -I $Id -I $HeadURL -I $URL > > >>> But when I try to set diff_args in /etc/puppet/puppet.conflike this: > > >>> diff_args = -ubB -I \$Id -I \$HeadURL -I \$URL > > >>> Puppet tries to interpolate the $Id and fails. > > >>> How can I quote the ''$'' sign so puppet will pass it as-is to diff? > > >>> I''m using puppet 0.25.4 on CentOS 5.5 x64_86. > > >>> Thanks. > > >>> -- > >>> You received this message because you are subscribed to the Google Groups "Puppet Users" group. > >>> To post to this group, send email to puppet-users@googlegroups.com. > >>> To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > >>> For more options, visit this group athttp://groups.google.com/group/puppet-users?hl=en. > > > -- > > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > > To post to this group, send email to puppet-users@googlegroups.com. > > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > > For more options, visit this group athttp://groups.google.com/group/puppet-users?hl=en.-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Darren Chamberlain
2010-Aug-27 11:42 UTC
Re: [Puppet Users] Re: quoting special characters in puppet.conf
* Amos Shapira <amos.shapira at gmail.com> [2010/08/27 01:06]:> e.g. here is what I tested again right now: > > diff_args = -ubB -I \$HeadURL > > and here are the errors that I get: > > err: /File[/usr/lib64/nagios/plugins/check_state_file.pl]: Failed to > retrieve current state of resource: Could not find value for $HeadURLIn many config files, such as mutt''s, you need to double all the backslashes, to protect them from the dereferencing that happens during parsing. So, in \\\$HeadURL, the first \ would escape the second \, and the third \ would escape the $, so that what gets passed through is \$HeadURL. Thus, this is untested speculation, but it can''t hurt to try: diff_args = -ubB -I \\\$HeadURL -- Darren Chamberlain <darren@boston.com> -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Amos Shapira
2010-Aug-30 03:17 UTC
[Puppet Users] Re: quoting special characters in puppet.conf
I tried that: diff_args = -ubB -I \\\$HeadURL and still get: err: ...: Failed to retrieve current state of resource: Could not find value for $HeadURL Does anyone knows what kind of code parses this? Is it passed through the shell? How many "levels of quoting" does it go through before reaching "diff" and by which programs? Thanks, --Amos On Aug 27, 9:42 pm, Darren Chamberlain <dar...@boston.com> wrote:> * Amos Shapira <amos.shapira at gmail.com> [2010/08/27 01:06]: > > > e.g. here is what I tested again right now: > > > diff_args = -ubB -I \$HeadURL > > > and here are the errors that I get: > > > err: /File[/usr/lib64/nagios/plugins/check_state_file.pl]: Failed to > > retrieve current state of resource: Could not find value for $HeadURL > > In many config files, such as mutt''s, you need to double all the > backslashes, to protect them from the dereferencing that happens > during parsing. So, in \\\$HeadURL, the first \ would escape the > second \, and the third \ would escape the $, so that what gets > passed through is \$HeadURL. > > Thus, this is untested speculation, but it can''t hurt to try: > > diff_args = -ubB -I \\\$HeadURL > > -- > Darren Chamberlain <dar...@boston.com>-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.