Created
November 30, 2018 22:39
-
-
Save pbrandiezs/3a8017d0c1aeebada4f37b5337c32838 to your computer and use it in GitHub Desktop.
Puppet example code using a selector to set the mode of a file.
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
$file_mode = $facts['os']['family'] ? { | |
'Debian' => '0600', | |
'RedHat' => '0655', | |
default => '0700', | |
} | |
file { '/tmp/test_mode.txt': | |
ensure => file, | |
mode => $file_mode, | |
owner => 'root', | |
group => 'root', | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment