Skip to content

Instantly share code, notes, and snippets.

@logicminds
Created May 6, 2020 22:45
Show Gist options
  • Save logicminds/8b08941f2d0e303ab047142e4603379e to your computer and use it in GitHub Desktop.
Save logicminds/8b08941f2d0e303ab047142e4603379e to your computer and use it in GitHub Desktop.
puppet sensitive datatype working example
class test(Sensitive $var1){
file{'/tmp/test123.txt':
ensure => file,
content => $var1,
}
}
class{'test': var1 => Sensitive.new('doublesecret') }
@logicminds
Copy link
Author

This produces:

[root@pe-xl-core-0 /]# puppet apply test.pp
Notice: Compiled catalog for pe-xl-core-0.puppet.vm in environment production in 0.01 seconds
Notice: /Stage[main]/Test/File[/tmp/test123.txt]/ensure: changed [redacted] to [redacted]
Notice: Applied catalog in 0.21 seconds

[root@pe-xl-core-0 /]# cat /tmp/test123.txt
doublesecret

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment