Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-2927

Override dmidecode inventory

    XMLWordPrintable

    Details

      Description

      By default we inventory some of the dmeidecode inventory if dmidecode is found.

      It would be nice to be able to override the inventoried attributes without having to edit the vendored policy.

      Want to inventory another dmidecode attribute?

      Instead of modifying the vendored policy, define dmidefs in augments.

      For example:

      {
        "vars": {
          "cfe_autorun_inventory_dmidecode": {
            "dmidefs": {
              "bios-vendor": "BIOS vendor",
              "bios-version": "BIOS version",
              "system-serial-number": "System serial number",
              "system-manufacturer": "System manufacturer",
              "system-version": "System version",
              "system-product-name": "System product name",
              "system-uuid": "System UUID",
              "bios-release-date": "Bios release date",
              "chassis-serial-number": "Chassis serial number",
              "chassis-asset-tag": "Chassis asset tag",
              "baseboard-asset-tag": "Baseboard asset tag"
            }
          }
        }
      }
      
      

      DEBUG run output:

      [root@hub masterfiles]# cf-agent -KID DEBUG_cfe_autorun_inventory_dmidecode
      R: DEBUG cfe_autorun_inventory_dmidecode: Obtained BIOS vendor = 'innotek GmbH'
      R: DEBUG cfe_autorun_inventory_dmidecode: Obtained BIOS version = 'VirtualBox'
      R: DEBUG cfe_autorun_inventory_dmidecode: Obtained System serial number = '0'
      R: DEBUG cfe_autorun_inventory_dmidecode: Obtained System manufacturer = 'innotek GmbH'
      R: DEBUG cfe_autorun_inventory_dmidecode: Obtained System version = '1.2'
      R: DEBUG cfe_autorun_inventory_dmidecode: Obtained System product name = 'VirtualBox'
      R: DEBUG cfe_autorun_inventory_dmidecode: Obtained System UUID = '5CA32EC5-7D53-49AA-AAEF-2B4502D34844'
      R: DEBUG cfe_autorun_inventory_dmidecode: Obtained Bios release date = '12/01/2006'
      R: DEBUG cfe_autorun_inventory_dmidecode: Obtained Chassis serial number = 'Not Specified'
      R: DEBUG cfe_autorun_inventory_dmidecode: Obtained Chassis asset tag = 'Not Specified'
      R: DEBUG cfe_autorun_inventory_dmidecode: Obtained Baseboard asset tag = 'Not Specified'
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                a10042 Nick Anderson
                Reporter:
                a10042 Nick Anderson
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel