Jeremy Hansen wrote:
> I'm new to puppet.  I'm trying to use some real case examples to better
> understand how Puppet works.
>
> Here's my case:
>
>     exec { "usermod -d /home/hadoop -s /bin/bash hadoop":
>         unless => "test `grep ^hadoop /etc/passwd | awk -F: '{print $6}'` == 
> '/home/hadoop'"
>     }

I'd check to be sure that puppet hasn't expanded the $6 before it ever
reaches the awk command.  You might need to escape it using \$6 or
re-work the 'unless' to use single quotes.

-- 
Todd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Despite the high cost of living, it remains a popular item.

Attachment: pgpEzlCXzxyeO.pgp
Description: PGP signature

Reply via email to