Last active
December 20, 2016 09:58
-
-
Save devcfgc/61205be17843ce792d1b to your computer and use it in GitHub Desktop.
Puppet tips
This file contains 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
#Avoid duplicate declaration https://docs.puppet.com/puppet/latest/reference/lang_collectors.html | |
File <| title == 'folder_name' |> { | |
ensure => directory | |
} | |
#Symbolic links | |
file { '/etc/apache2/sites-enabled/001-puppet-lore.org': | |
ensure => 'link', | |
target => '../sites-available/puppet-lore.org', | |
} | |
#Regex replacement (replace the last '/' with '/folder') | |
$logstore= ['/data/disk2/'] | |
regsubst($logstore, '\/[^\/]*$', '/folder') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment