Hi Howie,
> I'm trying to get up to speed with cfengine3, after being a cfengine2 user
> for many a year…I've got 3.10 community edition installed on a server
> host, and have a few clients bootstrapped to it.
Welcome to cfengine 3. :)
> If I try to run this standalone, I get the following:
>
> [root@cfg01 ~]# cf-agent -KI -f ./sshd.cf
> ./sshd.cf:24:0: error: Undefined body ifrepaired with type classes
> ./sshd.cf:23:0: error: Undefined bundle setconfigvalues with type
> editline
> error: Policy failed validation with command
> '"/var/cfengine/bin/cf-promises" -c "./sshd.cf"'
> error: Failsafe condition triggered. Interactive session detected,
> skipping failsafe.cf execution.
> error: Error reading CFEngine policy. Exiting…
> This makes me think I'm not including something that this policy needs,
> even as a standalone….
Yes, you used the if_reparied
body and the set_config_values
bundle from the
stdlib. The next error that you don't see is that you will need to specify the
bundlesequence
manually if you are trying to run it.
You can use inputs
in body file control
to load another policy file. For example:
body file control{ inputs => {"$(sys.libdir)/stdlib.cf"}; } bundle agent example # @brief Example loading stdlib with body file control { reports: "Running CFEngine $(sys.cf_version)"; }
Then run the example
bundle in the above snippet you would run the agent and
specify the bundlesequence
with -b
or --bundlesequence
.
cf-agent -KIf ./example.cf -b example
I hope this helps.
–
Nick Anderson
Doer of things, CFEngine
--
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 help-cfengine+unsubscribe@googlegroups.com.
To post to this group, send email to help-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/help-cfengine.
For more options, visit https://groups.google.com/d/optout.
--
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 help-cfengin...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to help-cfengine+unsubscribe@googlegroups.com.