Just put classes in your bundlesequence.  Since Cfengine caches promises,
you're not going to recomoile the promises every time, so do you really
need to have class-based inputs?  (You can do it, of course).

body common control {
    # This will definitely work as long as the classes are hard classes,
    # and may work (it depends...) if they are user-defined classes
    bundlesequence => {
        any::
            "foo",
            "baz",
        some::
            "gar"
        any::
            "bletch"
        };

    # This will probably work, but why bother?  No recompilation costs after
    # the first time the promises are cached...
    inputs => {
        any::
            "foo.cf",
            "baz.cf",
        some::
            "gar.cf"
        any::
            "bletch.cf"
        };

    }
> --===============2113979479==
> Content-Type: multipart/signed; boundary="=-=-=";
>       micalg=pgp-sha512; protocol="application/pgp-signature"
> 
> --=-=-=
> Content-Type: text/plain; charset=utf-8
> Content-Transfer-Encoding: quoted-printable
> 
> Le 6023 Septembre 1993, daniel klein a envoy=C3=A9:
> 
> Hello,
> 
> > Only one set of promises is ever run.  By default that comes from promise=
> s.cf,
> > but you can specify an alternative set with -f.  Those promises can consi=
> st
> > of many other files, which you list in the inputs.  Regardless of which f=
> iles
> > are included, the agent only runs the promises listed in the bundlesequen=
> ce
> > (and there is only one bundlesequence).
> >
> > So what you created was a standalone set of promises (with one promise), =
> and
> > a bundlesequence saying "run that one promise bundle).
> >
> > If you want to include that new set of promises into the "main" set of
> > promises in promises.cf, you add "tester" to the bundlesequence in promis=
> es.cf,
> > add test.cf to your list of inputs, and delete (or comment out) the body
> > common control in test.cf (because like Highlander, there can be only one=
> !)
> 
> With cf2 I used to include more files depending on classes:
> 
> cfagent.conf contains:
> 
> import:
>     debian:: cf.debian # debian specific configuration
> 
>     any::
>         cf.services
> 
> cf.services contains:
> 
> import:
> 
>     SSHServer:: cf.ssh
>     NTPClient:: cf.ntp
> 
> I find no import in cf3 reference manual.
> 
> What's the way to include files based on classes?
> 
> Regards.
> =2D-=20
> Daniel Dehennin
> R=C3=A9cup=C3=A9rer ma clef GPG:
> gpg --keyserver pgp.mit.edu --recv-keys 0x6A2540D1
> 
> --=-=-=
> Content-Type: application/pgp-signature
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.14 (GNU/Linux)
> 
> iEYEAREKAAYFAkuJbgcACgkQb97L6l6P4FvucwCcC/+Si0vHi8mjyiJZxIKljVJz
> axMAn2aiofte7XCRhe1J4hc0iUFC9RPl
> =fKjT
> -----END PGP SIGNATURE-----
> --=-=-=--
> 
> --===============2113979479==
> Content-Type: text/plain; charset="us-ascii"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline
> 
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@cfengine.org
> https://cfengine.org/mailman/listinfo/help-cfengine
> 
> --===============2113979479==--
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to