# nomakcooper/exa_facts architecture

> Architecture diagram of the GitHub repository nomakcooper/exa_facts, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nomakcooper/exa_facts
- Repository: https://github.com/nomakcooper/exa_facts

## Overview

##### Main Components

a) Core Module Component:

b) Input Sources (represented as rectangles):
- imageinfo command
- exadata.img.hw command
- dmidecode command
- databasemachine.xml file

c) Output Component:
- ansible_facts dictionary (containing the four main fact dictionaries)

##### Data Flow and Relationships

**[Input Sources] -> [exa_facts Module] -> [ansible_facts]**

Specifically show four main data paths:

**imageinfo ---------> exa_facts -----> exa_img dict**
**exadata.img.hw ---> exa_facts -----> exa_hw dict**
**dmidecode --------> exa_facts -----> system_info dict**
**databasemachine.xml -> exa_facts --> databasemachine dict**

##### Detailed Component Breakdown

exa_img:
- Information fields (Image version, Kernel version, etc.)

exa_hw:
- Model information

system_info:
- System-specific fields (SKU, UUID, Serial Number, etc.)

databasemachine:
- Hierarchical structure (ORACLE_CLUSTER > PAGE0 > RACKS > etc.)

##### Integration Points

How the module integrates with:
- Ansible playbook execution environment
- Oracle Exadata Machine
- Ansible facts system

##### Technical Details

Annotations for:
- Python implementation
- Ansible module requirements
- Supported check_mode
- Facts gathering capability

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Legend
        L1[Module]:::module
        L2[Input Source]:::input
        L3[Output]:::output
        L4[System File]:::system
    end

    subgraph "Core Module"
        EXA[exa_facts]:::module
    end

    subgraph "Input Sources"
        IMG["imageinfo command"]:::input
        HW["exadata.img.hw command"]:::input
        DMI["dmidecode command"]:::input
        XML["databasemachine.xml"]:::system
    end

    subgraph "Ansible Facts Output"
        FACTS["ansible_facts"]:::output
        EXA_IMG["exa_img dictionary"]:::output
        EXA_HW["exa_hw dictionary"]:::output
        SYS_INFO["system_info dictionary"]:::output
        DB_MACHINE["databasemachine dictionary"]:::output
    end

    %% Input to Module Flow
    IMG --> EXA
    HW --> EXA
    DMI --> EXA
    XML --> EXA

    %% Module to Output Flow
    EXA --> EXA_IMG
    EXA --> EXA_HW
    EXA --> SYS_INFO
    EXA --> DB_MACHINE

    %% Output Collection
    EXA_IMG --> FACTS
    EXA_HW --> FACTS
    SYS_INFO --> FACTS
    DB_MACHINE --> FACTS

    %% Styling
    classDef module fill:#3498db,stroke:#2980b9,color:white
    classDef input fill:#2ecc71,stroke:#27ae60,color:white
    classDef output fill:#e67e22,stroke:#d35400,color:white
    classDef system fill:#95a5a6,stroke:#7f8c8d,color:white

    %% Click Events
    click EXA "https://github.com/NomakCooper/exa_facts/blob/main/library/exa_facts.py"
    click FACTS "https://github.com/NomakCooper/exa_facts/tree/main/library/"
    click XML "https://github.com/NomakCooper/exa_facts/blob/main/README.md"
    click EXA_IMG "https://github.com/NomakCooper/exa_facts/blob/main/SANITY.md"
    click EXA_HW "https://github.com/NomakCooper/exa_facts/tree/main/LICENSE"
```
