help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Iteration Help


From: Paul Krizak
Subject: Re: Iteration Help
Date: Wed, 04 Jan 2006 16:22:52 -0600
User-agent: Mozilla Thunderbird 1.0.7 (X11/20050923)

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]