Yes, this is exactly what iteration does in this case.

Just be sure you set "split" to an appropriate split character. We use "%" since it's an uncommon character.

control:
any:: split = ( "%" )
any:: rmrpms = ( "sudo%mutt%magicdev%lam" )

shellcommands:
any:: "/$(rpmprog) $(rpmrem) $(rmrpms)"

Paul Krizak                         5900 E. Ben White Blvd. MS 625
Advanced Micro Devices              Austin, TX  78741
Linux/Unix Systems Engineering      Phone: (512) 602-8775
Microprocessor Solutions Sector


Brian E. Seppanen wrote:
I want to define the following

users = ( "user1 user2 user3 user4" )

I then want to call it.

shellcommands:
    any::
        "/usr/local/bin/add_user.pl $users"


What I want the script to do is pass a single username. In the script I would use getent to determine if the user account exists and if not then add the account.

Will iteration work so that it does only pass a single user each time? Wanted to make sure.

Thanks,

Brian Seppanen
608.826.1464


_______________________________________________
Help-cfengine mailing list
Help-cfengine@gnu.org
http://lists.gnu.org/mailman/listinfo/help-cfengine



_______________________________________________
Help-cfengine mailing list
Help-cfengine@gnu.org
http://lists.gnu.org/mailman/listinfo/help-cfengine

Reply via email to