private void configureApacheServerToUseAugeas() throws Exception {
ResourceTypes resourceTypes = new ResourceTypes(PluginLocation.APACHE_PLUGIN);
InventoryManager im = PluginContainer.getInstance().getInventoryManager();
ResourceContainer apacheServer = findApacheServerResource();
Configuration config = apacheServer.getResourceContext().getPluginConfiguration();
config.getSimple("augeasEnabled").setValue("yes");
im.updatePluginConfiguration(apacheServer.getResource().getId(), config);
//and run discovery so that the new resources can go into inventory
im.executeServiceScanImmediately();
}