[Puppet Users] Re: inlined-epp with hash
I found a solution: <%- | String $database_schemes, Hash[String, Hash[String, String]] $database_conf, | -%> DATABASES=<%= $database_schemes %> <% $database_conf.keys.sort.each |$key| { -%> ## <%= $key %>.jdbc.DRIVER=<%= $database_conf[$key]['oracle_cms_jdbc_driver'] %> <% } -%> Andreas Dvorak schrieb am Donnerstag, 10. September 2020 um 08:10:26 UTC+2: > Hi, > > I have this structure in hiera and want to use it in a inlined-epp file > > > > > > > > > > > > *cms::params::database_conf: 'oracle_cms_dev':oracle_cms_jdbc_schema: > 'CMS_DEV'oracle_cms_jdbc_user: 'CMS_DEV'oracle_cms_jdbc_driver: > 'oracle.jdbc.OracleDriver'oracle_cms_jdbc_url: 'jdbc:oracle:thin:)' > 'oracle_cms_dev2':oracle_cms_jdbc_schema: 'CMS_DEV2' > oracle_cms_jdbc_user: 'CMS_DEV2'oracle_cms_jdbc_driver: > 'oracle.jdbc.OracleDriver'oracle_cms_jdbc_url: 'jdbc:oracle:thin:* > > code in the class > $vault_vars_jdbc = { > 'database_conf' => $cms::params::database_conf, > } > > epp file > <%- | > Hash database_conf, > | -%> > > But I get the error: > Error: Failed to apply catalog: inline_epp(): Invalid EPP: Syntax error at > 'database_conf' (file: inlined-epp-text, line: 2, column: 11) > > So "Hash" does not work. Can somebody please help me? > > Regards, > Andreas > -- 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 puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/2c1244b6-e43d-4036-8ff6-95b0ca9c3886n%40googlegroups.com.
Re: [Puppet Users] inlined-epp with hash
Am 10.09.2020 um 08:10 schrieb Andreas Dvorak: epp file <%- | Hash database_conf, | -%> Hash $databse_conf -- 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 puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/rjcv5a%24s5t%241%40ciao.gmane.io.
Re: [Puppet Users] Is "Sensitive" broken?
Am Mittwoch, den 09.09.2020, 08:59 -0700 schrieb Josh Cooper: > The issue you're running into is due to the sensitive value being > interpolated: > > content => "${foo}\n" > > If you reference the Sensitive variable directly, then it will work > as expected: > > content => $foo OK, thanks a lot. But then I'd loose the trailing "\n". And it's also quite counterintuitive, isn't it? Think "exec", where it's sometimes needed to provide a password as part of the command. One would have to define $password as String instead of Sensitive and then wrap the whole command in a Sensitive() call (as Mattias suggested). > This issue and some possible solutions have been discussed in > https://tickets.puppetlabs.com/browse/PUP-10092. For example, Henrik > suggested a `rewrap` function > https://tickets.puppetlabs.com/browse/PUP-10093. Reg. the solution(s) discussed in there: Wouldn't the addition of a string concatenation operator (+) solve the problem right away (to make it content => $foo + "\n")? Bye... Dirk -- Dirk HeinrichsSenior Systems Engineer, Delivery PipelineOpenText ™ Discovery | RecommindPhone: +49 2226 15966 18Email: dheinric@opentext.comWebsite: www.recommind.deRecommind GmbH, Von-Liebig-Straße 1, 53359 RheinbachVertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan, Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB 10646This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbiddenDiese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E- Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet. -- 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 puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/fde84ffc639f40f677a739845213aac59b979692.camel%40opentext.com. signature.asc Description: This is a digitally signed message part
[Puppet Users] inlined-epp with hash
Hi, I have this structure in hiera and want to use it in a inlined-epp file *cms::params::database_conf: 'oracle_cms_dev':oracle_cms_jdbc_schema: 'CMS_DEV'oracle_cms_jdbc_user: 'CMS_DEV'oracle_cms_jdbc_driver: 'oracle.jdbc.OracleDriver'oracle_cms_jdbc_url: 'jdbc:oracle:thin:)' 'oracle_cms_dev2':oracle_cms_jdbc_schema: 'CMS_DEV2' oracle_cms_jdbc_user: 'CMS_DEV2'oracle_cms_jdbc_driver: 'oracle.jdbc.OracleDriver'oracle_cms_jdbc_url: 'jdbc:oracle:thin:* code in the class $vault_vars_jdbc = { 'database_conf' => $cms::params::database_conf, } epp file <%- | Hash database_conf, | -%> But I get the error: Error: Failed to apply catalog: inline_epp(): Invalid EPP: Syntax error at 'database_conf' (file: inlined-epp-text, line: 2, column: 11) So "Hash" does not work. Can somebody please help me? Regards, Andreas -- 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 puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/d7f184df-f421-4488-8bb9-dbc6dc85065en%40googlegroups.com.