This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <% if @test -%> | |
| command0 | |
| <%- if @test2 -%> | |
| command1 | |
| command2 | |
| command3 | |
| <%- end -%> | |
| <%- end -%> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class sqlite { | |
| file{'/usr/local/share/myschema.sql': | |
| ensure => file, | |
| content => file('sqlite/myschema.sql') | |
| } | |
| exec{'sqllite3 /path/to/db.sql < /usr/local/share/myschema.sql': | |
| refreshonly => true | |
| subscribe => File['/usr/local/share/myschema.sql'] | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $chain = @("CHAIN") | |
| ${file('/tmp/foo.pem')} | |
| ${file('/tmp/bar.pem')} | |
| | CHAIN | |
| notice($chain) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| profile::bacula::myclass::mydefines: | |
| foobar: | |
| abc: some value |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class rundeck_server { | |
| class { 'rundeck': | |
| package_ensure => latest, | |
| #grails_server_url => "https://${facts['ip']}", | |
| grails_server_url => "http://127.0.0.1:4440", | |
| key_storage_type => 'file', | |
| projects_storage_type => 'db', | |
| jvm_args => '-Dserver.http.host=0.0.0.0', | |
| database_config => { | |
| type => 'mysql', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # this will create the sysctl fragment if it dosn;t exist or changes | |
| # If the resource changes i.e. the first time its written or you change the value | |
| # sysctl -p will be called to write al the sysctl values | |
| # however a module from the forge may be better i have used the following in the past | |
| # https://forge.puppet.com/thias/sysctl | |
| # however that is old and the following newer one may be better | |
| # https://forge.puppet.com/herculesteam/augeasproviders_sysctl | |
| sysctl::internals::add_sysctl_fragment { "${name}": | |
| target => $target, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ~ $ grep -v ^# test.pp | |
| $loc = 'ab1' | |
| $arr = ['foo-ab1', 'bar-ab1', 'foo-ab1bar', 'bar-ab1$', 'foo-xz1', 'bar-xz1'] | |
| $new_arr = $arr.filter |$items| { $items !~ "-${loc}$" } | |
| notify {$new_arr:} | |
| ~ $ puppet apply test.pp | |
| Notice: Compiled catalog for work-laptop.home.arpa in environment production in 0.02 seconds | |
| Notice: foo-ab1bar | |
| Notice: /Stage[main]/Main/Notify[foo-ab1bar]/message: defined 'message' as 'foo-ab1bar' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package{'fail2ban': | |
| ensure => installed, | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class gobgp ( | |
| String $config_content, | |
| stdlib::Unixpath $config_file = '/etc/gobgp.conf' | |
| ) { | |
| ensure_packages(['gobgp']) | |
| file{$config_file, | |
| ensure => file, | |
| content => $config_content, | |
| notify => Service['gobgp'] | |
| require => Package['gobgp'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| disks => { | |
| nvme0n1 => { | |
| model => "INTEL SSDPEKKF512G8L", | |
| size => "476.94 GiB", | |
| size_bytes => 512110190592 | |
| }, | |
| sda => { | |
| model => "SD/MMC CRW", | |
| size => "0 bytes", | |
| size_bytes => 0, |