no-re...@cfengine.com writes:

> Forum: Cfengine Help
> Subject: Possibility of  forwarding arguments via command line to cf-agent
> Author: joe77
> Link to topic: https://cfengine.com/forum/read.php?3,22232,22232#msg-22232
>
> Hi,

Hello,

> I manually run a script via: cf-agent -f myscript.cf I am looking for
> a possibility to pass a command line argument to cfengine so that i
> can work with that parameter (e.g. regex) within the script.  I want
> the parameter to be automatically assigned to a string variable.
> Something like: cf-agent -f myscript.cf parameter01 parameter02
>
> I could probably do that with writing the parameter(s) into a file and
> than let cfengine read from that file. But is there something more
> comfortable ?

Why not using classes?

Just define classes on the command line and your cf policy will use
them.

Regards.

-- 
Daniel Dehennin
Récupérer ma clef GPG:
gpg --keyserver pgp.mit.edu --recv-keys 0x6A2540D1

Attachment: pgpVTtWqTjg6l.pgp
Description: PGP signature

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to