Re: File and folder rights
thierry thunot <[email protected]>
| Newsgroups | gmane.comp.sysutils.cfengine.general |
|---|---|
| Message-ID | <[email protected]> |
Hello Nick, Thanks again for giving me lots of tips on using Cfengine. I learn about it every day! I will once again follow your recommendations and split the promise into several bundles to respect your advice. Actually I need to transfer a lot of data (ip, hostname, version of software etc... ) automatically from my cfengine clients using files, for inventory for example. I am using the Reports function. I create a file on my client which I then transfer via SCP to a directory on another resource. Is it the best solution or do you advise me to use another function? Le jeudi 20 mai 2021 à 15:55:29 UTC+2, Nick Anderson a écrit : > Hi, > > thierry thunot <[email protected]> writes: > > note that after 2 pass it's ok > > Do you mean two passes within a single execution of cf-agent or two > executions of cf-agent? > > I see a few things here. > > I see that you are juggling both *files* and *reports* type promises. You > seem to be using *files* for managing file/directory presence/absence and > permissions, and *reports* for file content. For this I would probably > just use the *files* promises. It's not clear to me the benefit that > reports promises bring to this policy. > > I see that after the reports promises you have a files promise for > permissions. What is your expectation here, that the files promise will > actuate *after* the *reports* promises because it is later in the file? > > Remember, promises are actuated in the *normal order* > <https://docs.cfengine.com/docs/master/reference-language-concepts-normal-ordering.html> > as opposed to the written order. Your policy uses *vars*, *files*, > *classes*, and *reports* type promises, per the normal order, the > promises will run in the following order: > > 1. vars > 2. classes > 3. files > 4. reports > > You can use classes or the depends_on attribute > <https://docs.cfengine.com/docs/master/reference-promise-types.html#depends_on> > to influence the order in which promises within a bundle actuate. > Alternatively, you could break the policy into multiple bundles and control > the order of bundle actuation using *methods* promises. > -- 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/adf3cedb-66c4-477c-89c8-77e0eba9132bn%40googlegroups.com.