Created
May 18, 2017 17:59
-
-
Save hunner/a324bd9588d1cf4e14eb506fbdb00d0b to your computer and use it in GitHub Desktop.
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
include postgresql::server | |
# fails because you can't override from outside a class | |
Fail['/var/lib/postgresql9.5/datadir'] { | |
mode => '0755', | |
} | |
# succeeds because inheritance lets you override, but inheritance is spaghetti code | |
class test inherits postgresql::server::initdb { | |
File['/var/lib/postgresql9.5/datadir'] { | |
mode => '0755', | |
} | |
} | |
# works because collectors can directly modify resource declarations; super hacky but less spaghetti | |
File <| title == '/var/lib/postgresql9.5/datadir' |> { | |
mode => '0755', | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment