Skip to content

Commit

Permalink
chore: resort the manifests for malware-detection and compliance
Browse files Browse the repository at this point in the history
- add canonical facts to persist collection
- resort the specs order

Signed-off-by: Xiangce Liu <[email protected]>
  • Loading branch information
xiangce committed Jan 14, 2025
1 parent dee4d55 commit 95bb2f5
Showing 1 changed file with 148 additions and 41 deletions.
189 changes: 148 additions & 41 deletions insights/specs/datasources/manifests.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,23 @@
persist:
# determines what will appear in the archive
- name: insights.specs.default.DefaultSpecs.malware_detection
- name: insights.specs.Specs.malware_detection
enabled: true
- name: insights.specs.Specs.ansible_host
enabled: true
- name: insights.specs.Specs.blacklist_report
enabled: true
- name: insights.specs.Specs.blacklisted_specs
enabled: true
- name: insights.specs.Specs.branch_info
enabled: true
- name: insights.specs.Specs.display_name
enabled: true
- name: insights.specs.Specs.egg_release
enabled: true
- name: insights.specs.Specs.tags
enabled: true
- name: insights.specs.Specs.version_info
enabled: true
run_strategy:
Expand All @@ -47,43 +63,82 @@
# disable everything by default
# defaults to false if not specified.
default_component_enabled: false
packages:
# determines which packages are loaded. These will be namespaced to the relevant collector
- insights.specs.datasources.malware_detection
- insights.specs.default
- insights.specs.datasources.malware_detection
configs:
# determines which specs get loaded
- name: insights.specs.default.DefaultSpecs.malware_detection
- name: insights.specs.Specs.malware_detection
enabled: true
# Enable specs for collecting the system's canonical facts
- name: insights.specs.default.DefaultSpecs.mac_addresses
- name: insights.specs.Specs.ansible_host
enabled: true
- name: insights.specs.Specs.mac_addresses
- name: insights.specs.Specs.blacklist_report
enabled: true
- name: insights.specs.default.DefaultSpecs.etc_machine_id
- name: insights.specs.Specs.blacklisted_specs
enabled: true
- name: insights.specs.Specs.etc_machine_id
- name: insights.specs.Specs.branch_info
enabled: true
- name: insights.specs.default.DefaultSpecs.hostname
- name: insights.specs.Specs.display_name
enabled: true
- name: insights.specs.Specs.hostname
- name: insights.specs.Specs.egg_release
enabled: true
- name: insights.specs.default.DefaultSpecs.dmidecode
- name: insights.specs.Specs.tags
enabled: true
- name: insights.specs.Specs.version_info
enabled: true
- name: insights.specs.Specs.dmidecode
enabled: true
- name: insights.specs.default.DefaultSpecs.machine_id
- name: insights.specs.Specs.etc_machine_id
enabled: true
- name: insights.specs.Specs.machine_id
- name: insights.specs.Specs.hostname
enabled: true
- name: insights.specs.default.DefaultSpecs.ip_addresses
- name: insights.specs.Specs.installed_rpms
enabled: true
- name: insights.specs.Specs.ip_addresses
enabled: true
- name: insights.specs.default.DefaultSpecs.subscription_manager_id
- name: insights.specs.Specs.mac_addresses
enabled: true
- name: insights.specs.Specs.machine_id
enabled: true
- name: insights.specs.Specs.subscription_manager_id
enabled: true
- name: insights.specs.default.DefaultSpecs.malware_detection
enabled: true
- name: insights.specs.default.DefaultSpecs.ansible_host
enabled: true
- name: insights.specs.default.DefaultSpecs.blacklist_report
enabled: true
- name: insights.specs.default.DefaultSpecs.blacklisted_specs
enabled: true
- name: insights.specs.default.DefaultSpecs.branch_info
enabled: true
- name: insights.specs.default.DefaultSpecs.display_name
enabled: true
- name: insights.specs.default.DefaultSpecs.egg_release
enabled: true
- name: insights.specs.default.DefaultSpecs.tags
enabled: true
- name: insights.specs.default.DefaultSpecs.version_info
enabled: true
- name: insights.specs.default.DefaultSpecs.dmidecode
enabled: true
- name: insights.specs.default.DefaultSpecs.etc_machine_id
enabled: true
- name: insights.specs.default.DefaultSpecs.hostname
enabled: true
- name: insights.specs.default.DefaultSpecs.installed_rpms
enabled: true
- name: insights.specs.default.DefaultSpecs.ip_addresses
enabled: true
- name: insights.specs.default.DefaultSpecs.mac_addresses
enabled: true
- name: insights.specs.default.DefaultSpecs.machine_id
enabled: true
- name: insights.specs.default.DefaultSpecs.subscription_manager_id
enabled: true
""".lstrip()

compliance_manifest = """
Expand Down Expand Up @@ -114,6 +169,22 @@
enabled: true
- name: insights.specs.Specs.compliance_unassign
enabled: true
- name: insights.specs.Specs.ansible_host
enabled: true
- name: insights.specs.Specs.blacklist_report
enabled: true
- name: insights.specs.Specs.blacklisted_specs
enabled: true
- name: insights.specs.Specs.branch_info
enabled: true
- name: insights.specs.Specs.display_name
enabled: true
- name: insights.specs.Specs.egg_release
enabled: true
- name: insights.specs.Specs.tags
enabled: true
- name: insights.specs.Specs.version_info
enabled: true
run_strategy:
name: serial
Expand All @@ -130,66 +201,102 @@
- insights.specs.default
configs:
# determines which specs get loaded
- name: insights.specs.datasources.compliance.compliance_ds
enabled: true
- name: insights.specs.Specs.compliance
enabled: true
- name: insights.specs.default.DefaultSpecs.compliance
- name: insights.specs.Specs.compliance_policies
enabled: true
- name: insights.specs.default.DefaultSpecs.compliance_policies
- name: insights.specs.Specs.compliance_assign
enabled: true
- name: insights.specs.default.DefaultSpecs.compliance_assign
- name: insights.specs.Specs.compliance_unassign
enabled: true
- name: insights.specs.default.DefaultSpecs.compliance_unassign
- name: insights.specs.Specs.ansible_host
enabled: true
# Enable specs for collecting the system's canonical facts
- name: insights.specs.default.DefaultSpecs.mac_addresses
- name: insights.specs.Specs.blacklist_report
enabled: true
- name: insights.specs.Specs.mac_addresses
- name: insights.specs.Specs.blacklisted_specs
enabled: true
- name: insights.specs.default.DefaultSpecs.etc_machine_id
- name: insights.specs.Specs.branch_info
enabled: true
- name: insights.specs.Specs.etc_machine_id
- name: insights.specs.Specs.display_name
enabled: true
- name: insights.specs.default.DefaultSpecs.hostname
- name: insights.specs.Specs.egg_release
enabled: true
- name: insights.specs.Specs.hostname
- name: insights.specs.Specs.tags
enabled: true
- name: insights.specs.default.DefaultSpecs.dmidecode
- name: insights.specs.Specs.version_info
enabled: true
- name: insights.specs.Specs.dmidecode
enabled: true
- name: insights.specs.default.DefaultSpecs.machine_id
- name: insights.specs.Specs.etc_machine_id
enabled: true
- name: insights.specs.Specs.machine_id
- name: insights.specs.Specs.hostname
enabled: true
- name: insights.specs.default.DefaultSpecs.ip_addresses
- name: insights.specs.Specs.installed_rpms
enabled: true
- name: insights.specs.Specs.ip_addresses
enabled: true
- name: insights.specs.default.DefaultSpecs.subscription_manager_id
- name: insights.specs.Specs.mac_addresses
enabled: true
- name: insights.specs.Specs.subscription_manager_id
- name: insights.specs.Specs.machine_id
enabled: true
- name: insights.specs.Specs.os_release
enabled: true
- name: insights.specs.Specs.redhat_release
enabled: true
- name: insights.specs.default.DefaultSpecs.redhat_release
- name: insights.specs.Specs.subscription_manager_id
enabled: true
- name: insights.specs.Specs.os_release
- name: insights.specs.default.DefaultSpecs.compliance
enabled: true
- name: insights.specs.default.DefaultSpecs.os_release
- name: insights.specs.default.DefaultSpecs.compliance_policies
enabled: true
- name: insights.parsers.redhat_release.RedhatRelease
- name: insights.specs.default.DefaultSpecs.compliance_assign
enabled: true
- name: insights.parsers.os_release.OsRelease
- name: insights.specs.default.DefaultSpecs.compliance_unassign
enabled: true
- name: insights.specs.Specs.installed_rpms
- name: insights.specs.default.DefaultSpecs.ansible_host
enabled: true
- name: insights.specs.default.DefaultSpecs.blacklist_report
enabled: true
- name: insights.specs.default.DefaultSpecs.blacklisted_specs
enabled: true
- name: insights.specs.default.DefaultSpecs.branch_info
enabled: true
- name: insights.specs.default.DefaultSpecs.display_name
enabled: true
- name: insights.specs.default.DefaultSpecs.egg_release
enabled: true
- name: insights.specs.default.DefaultSpecs.tags
enabled: true
- name: insights.specs.default.DefaultSpecs.version_info
enabled: true
- name: insights.specs.default.DefaultSpecs.dmidecode
enabled: true
- name: insights.specs.default.DefaultSpecs.etc_machine_id
enabled: true
- name: insights.specs.default.DefaultSpecs.hostname
enabled: true
- name: insights.specs.default.DefaultSpecs.installed_rpms
enabled: true
- name: insights.specs.default.DefaultSpecs.ip_addresses
enabled: true
- name: insights.specs.default.DefaultSpecs.mac_addresses
enabled: true
- name: insights.specs.default.DefaultSpecs.machine_id
enabled: true
- name: insights.specs.default.DefaultSpecs.os_release
enabled: true
- name: insights.specs.default.DefaultSpecs.redhat_release
enabled: true
- name: insights.specs.default.DefaultSpecs.subscription_manager_id
enabled: true
- name: insights.parsers.installed_rpms.InstalledRpms
enabled: true
- name: insights.parsers.os_release.OsRelease
enabled: true
- name: insights.parsers.redhat_release.RedhatRelease
enabled: true
- name: insights.specs.datasources.compliance.compliance_ds
enabled: true
""".lstrip()

manifests = {'compliance': compliance_manifest, 'malware-detection': malware_detection_manifest}
Expand Down

0 comments on commit 95bb2f5

Please sign in to comment.