Very new to puppet here.
Suppose:
define add_user ($shell) {
$username = $title
user { $username:
shell = $shell,
}
group { $username:
require => User[$username]
}
}
And:
class zsh {
package { 'zsh': ensure => 'installed' }
}
class bash {
package { 'bash': ensure => 'installed' }
}
And finally:
node default {
add_user { 'foo':
shell => '/bin/zsh'
}
}
How do I set up a requirement from the user to the shell?
Try to add something like this to your add_user function: