Re: File and folder rights

"'Nick Anderson' via help-cfengine" <[email protected]>
Newsgroups gmane.comp.sysutils.cfengine.general
Message-ID <[email protected]>
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/] 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] 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.


[promises are actuated in the /normal order/]
<https://docs.cfengine.com/docs/master/reference-language-concepts-normal-ordering.html>

[`depends_on' attribute]
<https://docs.cfengine.com/docs/master/reference-promise-types.html#depends_on>

-- 
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/87sg2hldbl.fsf%40northern.tech.

-- 
Nick Anderson | Doer of Things | (+1) 785-550-1767 | https://northern.tech

-- 
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/87sg2hldbl.fsf%40northern.tech.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.