Created
November 30, 2018 22:45
-
-
Save pbrandiezs/cf5e6040b2721d1bd1afe4c6f6eec15c to your computer and use it in GitHub Desktop.
Puppet code example showing dependencies
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
group { 'file_group': | |
ensure => present, | |
} | |
user { 'file_user': | |
ensure => present, | |
gid => 'file_group', | |
} | |
file { '/tmp/my_files': | |
ensure => directory, | |
before => [File['/tmp/my_files/file1.txt'], File['/tmp/my_files/file2.txt']], | |
require => User['file_user'], | |
} | |
file { '/tmp/my_files/file1.txt': | |
ensure => file, | |
owner => 'root', | |
group => 'file_group', | |
} | |
file { '/tmp/my_files/file2.txt': | |
ensure => file, | |
owner => 'file_user', | |
group => 'file_group', | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment