Forum: Cfengine Help Subject: Random variable persistence problem -- crontab randomization Author: jgreer Link to topic: https://cfengine.com/forum/read.php?3,20077,20077#msg-20077
Looking for best practices advice on a problem. I would like to manage a cron.d file and use edit_line to randomize the minute at which the file is run on the agent side. I'm looking, generally, to make more use of templating in our policies, but this particular case is giving me some trouble. Requirements: - Once a random integer (0,59) has been selected for a particular host, it should persist - the file should not be rewritten every time the agent is run, both because think that's inelegant and because Tripwire will watch the file - If the master template is updated, the clients should pick up that change - at that point, I don't care whether the minute value changes, but thereafter it should persist I realize there are other solutions to the problem itself - running the cron job as a Cfengine command, for example. I'm mostly interested in hearing whether anyone else has solved the broader problem of generating random agent data and reusing it in subsequent agent runs. -Jessica _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine