Forum: Cfengine Help Subject: Re: Hostname based classes and virtual machines in Cfengine 3 Author: dnaeon Link to topic: https://cfengine.com/forum/read.php?3,22131,22147#msg-22147
dnaeon Wrote: ------------------------------------------------------- > Another solution proposed by Mikhail Gusarov is to > exclude the IP addresses of the jails, and they > should not be present when cf-agent runs on the > host. > > The way to get the IP addresses of the jails would > be something like: > > > # jls | grep -v JID | awk '{ print $2 }' > > > Then if we put this output to a variable in > Cfengine 3, classify() them, and then negate these > classes for "freebsd_hosts" it should work. > > But I have no idea, how this can be done in > Cfengine 3... > > Any ideas? > I've tried manually to negate a class, but it's not possible as I guess Cfengine recognizes this as a hard class. # cf-agent -v -N ipv4_10_1_17_20 Fatal cfengine error: Cannot negate the reserved class So it seems that doing it in Cfengine's way won't help much... _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine