puppet onlyif specified nodes
- by Valintinr
I'm trying to write a puppet template. I have a puppet-master and a few puppet-agents and they all must be divided. I think it's good to do this by the node's hostname.
But when I tried to do this I've encountered an error
"puppet-agent[169037]: (/Stage[main]//Exec[adduser]) Could not evaluate: Could not find command 'ru1'"
see code below
exec { 'adduser':
command => 'sudo adduser -m -p pawSfQewWrUAA test -G wheel',
path => [ '/bin','/usr/bin' ],
onlyif => "$hostname == ru1"
}
I need to specify this task for only one node with the hostname ru1.
So have can I do this?
Thanks.