Skip to content

Instantly share code, notes, and snippets.

@big-samantha
Last active December 4, 2017 22:50
Show Gist options
  • Save big-samantha/4e8c584c28f19a045a39a671d6529795 to your computer and use it in GitHub Desktop.
Save big-samantha/4e8c584c28f19a045a39a671d6529795 to your computer and use it in GitHub Desktop.
if has_key($params, 'unix_user') {
$unix_user_real = str2bool($params['unix_user'])
case $unix_user_real {
false: {}
default: {
@account::user { $user_name:
ensure => present,
shell => $shell,
uid => $uid,
group => $group,
comment => $comment,
purgekeys => true,
}
}
}
}
else {
@account::user { $user_name:
ensure => present,
shell => $shell,
uid => $uid,
group => $group,
comment => $comment,
purgekeys => true,
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment