Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add custom facts #6

Merged
merged 1 commit into from
Aug 13, 2021
Merged

Conversation

fraenki
Copy link
Contributor

@fraenki fraenki commented Aug 9, 2021

This adds custom facts that look similar to the "os" facts hash, providing basic details about the installed OPNsense release and installed plugins:

$ facter -p
[...]
opnsense => {
  architecture => "amd64",
  name => "OPNsense",
  release => {
    flavour => "OpenSSL",
    full => "21.7.1",
    hash => "ec466867c",
    major => "21.7",
    minor => "1"
  },
  plugins => [
    "os-api-backup",
    "os-dmidecode",
    "os-firewall",
    "os-lldpd",
    "os-haproxy",
    "os-relayd",
    "os-smart",
    "os-wol",
    "os-qemu-guest-agent",
    "os-bind",
    "os-zabbix-agent",
    "os-zabbix5-proxy",
    "os-nginx",
    "os-postfix",
    "os-wireguard"
  ]
}

@fraenki fraenki force-pushed the add_facts branch 2 times, most recently from 3c7150e to 8f2914e Compare August 9, 2021 21:55
@codecov
Copy link

codecov bot commented Aug 10, 2021

Codecov Report

Merging #6 (139a02d) into main (3c75dc7) will decrease coverage by 10.29%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##              main       #6       +/-   ##
============================================
- Coverage   100.00%   89.70%   -10.30%     
============================================
  Files           10       11        +1     
  Lines          244      272       +28     
============================================
  Hits           244      244               
- Misses           0       28       +28     
Impacted Files Coverage Δ
lib/facter/opnsense.rb 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3c75dc7...139a02d. Read the comment docs.

@andreas-stuerz
Copy link
Owner

Could you please add the missing test so i can merge the PR?
Thx for the contribution!

@andreas-stuerz andreas-stuerz added the feature Changelog Section: Added (Minor) label Aug 12, 2021
@andreas-stuerz andreas-stuerz merged commit 377c3ad into andreas-stuerz:main Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Changelog Section: Added (Minor)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants