Re: cf-agent and memory usage

Bas van der Vlies <[email protected]>
Newsgroups gmane.comp.sysutils.cfengine.general
Message-ID <[email protected]>

> 
> Hmm, anyone which has used classesmatching(".*", "hardclass") to get
> something which can be checked for in mustache templates using '#' ie
> equal to:
> ---
> {{#classes.debian_11}}
> .....
> {{/classes.debian_11}}
> ---
> 
> I would need the classes from the environment or those defined in
> def.json.
> 
I do not know what ypu exactly mean with this, but I use this in the SCL library a lot if I understand you correctly:. Classes defined in def.json are globally known and can be used in the mustache template. I do not use the datastate() functiion at all.
eg:
```

{{#classes.SSH_PUBKEY_AUTHENTICATION}}
AuthorizedKeysCommand {{vars.scl.ssh.authorized_keys_command}}
    {{#classes.SLES}}
AuthorizedKeysCommandUser {{vars.scl.ssh.authorized_keys_commanduser}}                                                                                                                                    
    {{/classes.SLES}}
    {{#classes.debian}}
AuthorizedKeysCommandUser {{vars.scl.ssh.authorized_keys_commanduser}}
    {{/classes.debian}}
    {{#classes.centos}}
AuthorizedKeysCommandRunAs {{vars.scl.ssh.authorized_keys_commanduser}}
    {{/classes.centos}}
{{/classes.SSH_PUBKEY_AUTHENTICATION}}
```

the `SSH_PUBKEY_AUTHENTICATION` is defined in a `def.json` and converted by the SCL library to the  `SSH_PUBKEY_AUTHENTICATION`
```
        classes: {
            BATCHSERVER_NODE:  [  “debian_10” ]
	},
        ssh: {
            classes: {
                PUBKEY_AUTHENTICATION: any
            },
```

Maybe this answer your question


--
Bas van der Vlies
| High Performance Computing Visualisation | SURF| Science Park 140 | 1098 XG  Amsterdam
| T +31 (0) 20 800 1300  | [email protected] | www.surf.nl |




-- 
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/93CBD705-711B-42FF-9790-C35F51536107%40surf.nl.
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.