diff options
author | Nan Liu <nan@puppetlabs.com> | 2012-07-11 16:41:17 -0700 |
---|---|---|
committer | Nan Liu <nan@puppetlabs.com> | 2012-07-11 16:41:17 -0700 |
commit | e29cbb8be4347a471edae244aef6c26faada38bc (patch) | |
tree | ec92d13791e0a391e40a755516fc2c4ff989f714 /manifests | |
parent | 3795cdabd43e909702f433d0be3886626f97e802 (diff) | |
download | puppet-tftp-e29cbb8be4347a471edae244aef6c26faada38bc.tar.gz puppet-tftp-e29cbb8be4347a471edae244aef6c26faada38bc.tar.bz2 |
Update redhat tftp file owner.
This update address file owner to nobody by default for RHEL family.
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/file.pp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/manifests/file.pp b/manifests/file.pp index 3628188..48a5fab 100644 --- a/manifests/file.pp +++ b/manifests/file.pp @@ -29,8 +29,8 @@ # define tftp::file ( $ensure = file, - $owner = 'tftp', - $group = 'tftp', + $owner = undef, + $group = undef, $mode = '0644', $recurse = false, $purge = undef, @@ -40,6 +40,19 @@ define tftp::file ( $source = undef ) { include 'tftp' + include 'tftp::params' + + if $owner { + $tftp_owner = $owner + } else { + $tftp_owner = $tftp::params::username + } + + if $group { + $tftp_group = $group + } else { + $tftp_group = $tftp::params::username + } if $source { $source_real = $source @@ -54,8 +67,8 @@ define tftp::file ( file { "${tftp::directory}/${name}": ensure => $ensure, - owner => $owner, - group => $group, + owner => $tftp_owner, + group => $tftp_group, mode => $mode, recurse => $recurse, purge => $purge, |