Re: Data
Nicolas Charles <[email protected]> Thu, 28 Dec 2023 09:41:45 +0100
| Newsgroups | gmane.comp.sysutils.cfengine.general |
|---|---|
| Message-ID | <[email protected]> |
What I usually do is guarding the execresult with a class defined at runtime. It prevents cf-promises from evaluating it and allows unitary execution Le 28 décembre 2023 01:05:32 GMT+01:00, 'Nick Anderson' via help-cfengine <[email protected]> a écrit : >During update policy use a commands promise that populates the json. Then >you can use the read json function or similar during the regular policy >run. > >On Wed, Dec 27, 2023, 3:56 PM Martin Simons <[email protected]> wrote: > >> Dear CFEngineer, >> >> Fosdem and Configmanagement Camp are due in about one month. >> I will do a talk on external data for nodes, CFEngine nodes too, in a >> landscape. >> https://github.com/Webhuis/Data >> >> The idea is that a node sends a message to Data and then receives a tailor >> made set of data it can use for its operation. In principple Data serves >> any node that is able to send, receive and process a message. >> >> CFEngine nodes invoke a Python script in the bginning of the process. >> The nodes bother Data a bit too much, because they send the message nine >> times! >> >> Up to now I use the following line to obtain the data: >> "response" string => >> execresult("/var/cfengine/bin/cf-message.py >> '$(node_hard_classes_feed)'","noshell"); >> >> The requirements are: >> 1. The data should become available at the beginning of the run >> 2. The data has to be stored in the json format >> 3. The data has to become available in a variable, not on disk >> >> Is there a way to avoid the agent to send the message nine times? >> >> Regards, >> Martin. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "help-cfengine" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/help-cfengine/66ba6398-d0bd-493a-9e32-9649d5dce0dfn%40googlegroups.com >> <https://groups.google.com/d/msgid/help-cfengine/66ba6398-d0bd-493a-9e32-9649d5dce0dfn%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > >-- >You received this message because you are subscribed to the Google Groups "help-cfengine" group. >To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. >To view this discussion on the web visit https://groups.google.com/d/msgid/help-cfengine/CAE46pPs1zMvSMXQR3v5q-egDSfHMWDfH-aC%3DpX1UR_Bsr4f5Mg%40mail.gmail.com. -- Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté. -- You received this message because you are subscribed to the Google Groups "help-cfengine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/help-cfengine/9049BB27-920D-4839-8BFB-616791C58820%40rudder.io.