Re: [EXTERNAL] - [Puppet Users] Re: Is "Sensitive" broken?
On 09/09/20 13:53:36, 'Dirk Heinrichs' via Puppet Users wrote: > Am Mittwoch, den 09.09.2020, 06:34 -0700 schrieb Marty Ewings: > > > https://puppet.com/docs/puppet/6.17/lang_data_sensitive.html > > You need to "unwrap" the sensitive data in order to consume the > > original data in a function > > Yes, did that, too. And that works. However, the data is then shown in > clear again (in the diff, or in the command of an exec) , so I gained > exactly nothing. The following snippet redacts the content from log output but stores the cleartext in the resulting file, thus doing what you are looking for ``` file { "${home}/.meraki_env": ensure => file, owner => $user, group => $group, content => Sensitive("export MERAKI_DASHBOARD_API_KEY=${dashboard_api_key}"), mode=> '0600', } ``` Cheers, Mattias -- Mattias Giese Linux Consultant und Trainer Mail: gi...@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt, HRB 3537 -- 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/20200909141421.dinia4xd5bexwxil%40gintonic. signature.asc Description: PGP signature
Re: [EXTERNAL] - [Puppet Users] Re: Is "Sensitive" broken?
Am Mittwoch, den 09.09.2020, 06:34 -0700 schrieb Marty Ewings: > https://puppet.com/docs/puppet/6.17/lang_data_sensitive.html > You need to "unwrap" the sensitive data in order to consume the > original data in a function Yes, did that, too. And that works. However, the data is then shown in clear again (in the diff, or in the command of an exec) , so I gained exactly nothing. 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/f2963f2e9fec00de49c52ac3e28ef8fc7e977b18.camel%40opentext.com. signature.asc Description: This is a digitally signed message part