Hi group, I am trying to template a bash script with puppet. Unfortunately, this fails with a bang, and even more unfortunately I have no idea why. The script starts with the usual #!/bin/bash When I run puppet, I get this: info: Caching catalog for l1211022.sdst.sbaintern.de err: Failed to apply catalog: Parameter source failed: Could not understand source #!/bin/bash [... complete script dump ...] ... in neon pink. I tried encapsulating it in <%= "#!/bin/bash" %>, or even in <%= "!" %><%= "#/bin/bash" %>, but no use. I think I am triggering some ERB-internal thing here, but I could not find anything in the docs, and I am kind of lost here. Can anyone help? Thanks in advance & greetings, Axel. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/XSWbTxWmxgcJ. 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.
Dominic Cleal
2013-Jan-17 09:59 UTC
Re: [Puppet Users] Templating a shell script - major error
On 17/01/13 09:54, Axel Bock wrote:> Hi group, > > I am trying to template a bash script with puppet. Unfortunately, this > fails with a bang, and even more unfortunately I have no idea why. > > The script starts with the usual > > #!/bin/bash > > When I run puppet, I get this: > > info: Caching catalog for l1211022.sdst.sbaintern.de > err: Failed to apply catalog: Parameter source failed: Could not^^^^^^> understand source #!/bin/bashLooks like you''re using the template() function with the source parameter when it should be content => template(...). Puppet is trying to parse the shell script as a source URL. -- Dominic Cleal Red Hat Engineering -- 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.
Axel Bock
2013-Jan-17 09:59 UTC
[Puppet Users] Re: Templating a shell script - major error
oops. forget everything. my mistake. stupid one. and of course this _can_ only be discovered after you posted a stupid question to really document your own idiocy. :) Thanks, Axel. Am Donnerstag, 17. Januar 2013 10:54:23 UTC+1 schrieb Axel Bock:> > Hi group, > > I am trying to template a bash script with puppet. Unfortunately, this > fails with a bang, and even more unfortunately I have no idea why. > > The script starts with the usual > > #!/bin/bash > > When I run puppet, I get this: > > info: Caching catalog for l1211022.sdst.sbaintern.de > err: Failed to apply catalog: Parameter source failed: Could not > understand source #!/bin/bash > > [... complete script dump ...] > > ... in neon pink. I tried encapsulating it in <%= "#!/bin/bash" %>, or > even in <%= "!" %><%= "#/bin/bash" %>, but no use. I think I am triggering > some ERB-internal thing here, but I could not find anything in the docs, > and I am kind of lost here. > > > Can anyone help? > Thanks in advance & greetings, > Axel. >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/Jf4QL654xr0J. 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.
Axel Bock
2013-Jan-17 10:14 UTC
Re: [Puppet Users] Templating a shell script - major error
yes, found it already (see my last messge). sorry for wasting your lifetime ;) Am Donnerstag, 17. Januar 2013 10:59:33 UTC+1 schrieb Dominic Cleal:> > On 17/01/13 09:54, Axel Bock wrote: > > Hi group, > > > > I am trying to template a bash script with puppet. Unfortunately, this > > fails with a bang, and even more unfortunately I have no idea why. > > > > The script starts with the usual > > > > #!/bin/bash > > > > When I run puppet, I get this: > > > > info: Caching catalog for l1211022.sdst.sbaintern.de > > err: Failed to apply catalog: Parameter source failed: Could not > ^^^^^^ > > understand source #!/bin/bash > > Looks like you''re using the template() function with the source > parameter when it should be content => template(...). Puppet is trying > to parse the shell script as a source URL. > > -- > Dominic Cleal > Red Hat Engineering >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/tm2ey84u16UJ. 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.
Dan White
2013-Jan-17 12:57 UTC
Re: [Puppet Users] Templating a shell script - major error
Don''t feel bad, Axel. You learned from this goof. The stooopid question is the one you do NOT ask . Then you suffer in silent ignorance. Ignorance can be fixed. Stupidity ....? “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” Bill Waterson (Calvin & Hobbes) ----- Original Message ----- From: "Dominic Cleal" <dcleal@redhat.com> To: puppet-users@googlegroups.com Sent: Thursday, January 17, 2013 4:59:33 AM Subject: Re: [Puppet Users] Templating a shell script - major error On 17/01/13 09:54, Axel Bock wrote:> Hi group, > > I am trying to template a bash script with puppet. Unfortunately, this > fails with a bang, and even more unfortunately I have no idea why. > > The script starts with the usual > > #!/bin/bash > > When I run puppet, I get this: > > info: Caching catalog for l1211022.sdst.sbaintern.de > err: Failed to apply catalog: Parameter source failed: Could not^^^^^^> understand source #!/bin/bashLooks like you''re using the template() function with the source parameter when it should be content => template(...). Puppet is trying to parse the shell script as a source URL. -- Dominic Cleal Red Hat Engineering -- 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.