nofusscomputing / centurion_erp

An ERP with a focus on ITSM and Automation
MIT License
0 stars 0 forks source link

Inventory Device type detection #151

Open jon-nfc opened 2 months ago

jon-nfc commented 2 months ago

as part of conducting the device inventory detect the device type to populate the ITAM database.

Requirements

jon-nfc commented 2 months ago

marked this issue as related to #74

jon-nfc commented 2 months ago

added 2m of time spent

jon-nfc commented 1 month ago

In GitLab by @jasonpagetas on Jul 20, 2024, 23:49

During the gather facts stage one of the returns is: (This was on a laptop)


  "ansible_form_factor": "Notebook",
jon-nfc commented 1 month ago

In GitLab by @jasonpagetas on Jul 20, 2024, 23:49

added 3m of time spent

jon-nfc commented 1 month ago

this will need to be confirmed via the docs if the value is always populated.

jon-nfc commented 1 month ago

added 2m of time spent

jon-nfc commented 1 month ago

In GitLab by @jasonpagetas on Jul 21, 2024, 24:50

Even if it doesn't you can still gather the hardware facts using something like this


---
- name: Collect Form factor
  hosts: localhost
  become: false
  gather_facts: false
  tasks:
  - name: Collect 'hardware' only facts!
    setup:
      gather_subset:
      - hardware
  - name: debug
    debug:
      var: hostvars[inventory_hostname].ansible_form_factor
jon-nfc commented 1 month ago

In GitLab by @jasonpagetas on Jul 21, 2024, 24:54

This is the link to where i mentioned the values that can be returned for ansible_form_factor

github link