Enable the “Packages” plugin in /etc/bcfg2.conf, and configure the Yum repositories in /var/lib/bcfg2/Packages/sources.xml.
If a package is unwanted, remove it:
sudo yum remove PACKAGEOtherwise, add <Package name="PACKAGE" /> to the Base or Bundler configuration.
Ensure the Yum repository sources configured in /var/lib/bcfg2/Packages/sources.xml are correct.
Ensure the Yum repositories themselves are up-to-date with the main package and dependencies.
Rebuild the Packages plugin cache:
bcfg2-admin xcmd Packages.Refresh
- Add <Service name="SERVICE" /> to the Base or Bundler configuration.
- Add <Service name="SERVICE" status="on" type="chkconfig" /> to /var/lib/bcfg2/Rules/services.xml.
- Run rpm -V PACKAGE
- Add configuration files (the ones with “c” next to them in the verification output) to /var/lib/bcfg2/Cfg/.
- For example, /etc/motd to /var/lib/bcfg2/Cfg/etc/motd/motd. Yes, there is an extra directory level named after the file.
Specify configuration files as <Path name='PATH' /> in the Base or Bundler configuration.
Add directories to /var/lib/bcfg2/Rules/directories.xml. For example:
<Rules priority="0"> <Directory name="/etc/cron.hourly" group="root" owner="root" mode="0700" /> <Directory name="/etc/cron.daily" group="root" owner="root" mode="0700" /> </Rules>
- Option A: Explicitly list the instances
Drop the <Package /> from the Base or Bundler configuration.
Add an explicit <BoundPackage> and <Instance /> configuration to a new Bundle, like the following:
<Bundle name='keys'> <!-- GPG keys --> <BoundPackage name="gpg-pubkey" type="rpm" version="foo"> <Instance simplefile="/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL" version="217521f6" release="45e8a532"/> <Instance simplefile="/etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release" version="37017186" release="45761324"/> </BoundPackage> </Bundle>Add the bundle to the applicable groups in /var/lib/bcfg2/Metadata/groups.xml.
- Option B: Disable verification of the package
- Add pkg_checks="false" to the <Package /> tag.
- Unclear verification problem (no details from Bcfg2)
- Run bcfg2 -vqI to see detailed verification issues (but deny any suggested actions).
- Permissions mismatch
Create an info.xml file in the same directory as the configuration file. Example:
<FileInfo> <Group name='webserver'> <Info owner='root' group='root' mode='0652'/> </Group> <Info owner='root' group='sys' mode='0651'/> </FileInfo>
Generate the physical configuration from the server side:
bcfg2-info buildfile /test test.example.comGenerate the physical configuration from the client side:
bcfg2 -vqn -c/root/bcfg2-physical.xml