Skip to content

Commit

Permalink
conditional for script paths
Browse files Browse the repository at this point in the history
  • Loading branch information
jakerundall committed Dec 6, 2023
1 parent 5c80c3a commit 0e3420e
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions manifests/quota.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,26 @@
) {
# defaults for file resources
File {
ensure => file,
group => 'root',
mode => '0644',
owner => 'root',
}

# install run-script for Bash-like shells
file { "/etc/profile.d/${file_prefix}_quota.sh":
content => epp( 'profile_user_environment/quota.sh.epp' ),
if $command_paths.empty {
# no quota scripts to run, remove run-scripts
## Bash-like shells
file { "/etc/profile.d/${file_prefix}_quota.sh":
ensure => absent,
}
## csh-like shells
## ...
} else {
# quota script(s) listed, manage run-scripts
## Bash-like shells
file { "/etc/profile.d/${file_prefix}_quota.sh":
ensure => file,
content => epp( 'profile_user_environment/quota.sh.epp' ),
}
## csh-like shells
}

# install run-script for csh-like shells
}

0 comments on commit 0e3420e

Please sign in to comment.