kwilczynski / facter-facts Goto Github PK
View Code? Open in Web Editor NEWVarious facts to use within Facter and Puppet
License: Apache License 2.0
Various facts to use within Facter and Puppet
License: Apache License 2.0
Various facts to use within Facter and Puppet will be stored here.
The details provided by the fact under mounts yields the /dev/mapper/- for the device details.
I happened to come across an issue where I needed to dynamically create a new filesystem across SUSE, RH, and CentOS where the VGs names vary drastically (system,rootvg,vgroot,centos) for the / partition.
Using the mountpoints fact, I extracted the / vg with
Facter.value(:mountpoints)['/']['device'].split(' ')[0].split('/')[3].split('-')[0]
and the LV with
Facter.value(:mountpoints)['/']['device'].split(' ')[0].split('/')[3].split('-')[1]
Would it make any sense to do this within the mountpoints to provide that detail for LVM operations using mountpoints?
I'd like to implement some of your facts but I'm unsure as to where they should go. Is there a way to implement these w/o having to 'facter -p' (for custom facts)?
E.g. no /dev/md1 reported:
partitions => {"sda1"=>{"size"=>"1951744", "label"=>"sysresccd:0", "filesystem"=>"linux_raid_member"}, "sda2"=>{"size"=>"1463193600", "label"=>"vmhost12:1", "filesystem"=>"linux_raid_member"}, "sdb1"=>{"size"=>"1951744", "label"=>"sysresccd:0", "filesystem"=>"linux_raid_member"}, "sdb2"=>{"size"=>"1463193600", "label"=>"vmhost12:1", "filesystem"=>"linux_raid_member"}, "sdc1"=>{"size"=>"1951744", "label"=>"sysresccd:0", "filesystem"=>"linux_raid_member"}, "sdc2"=>{"size"=>"1463193600", "label"=>"vmhost12:1", "filesystem"=>"linux_raid_member"}, "sdd1"=>{"size"=>"1951744", "label"=>"sysresccd:0", "filesystem"=>"linux_raid_member"}, "sdd2"=>{"size"=>"1463193600", "label"=>"vmhost12:1", "filesystem"=>"linux_raid_member"}}
But there is a /dev/md1 with partitions:
Model: Linux Software RAID Array (md)
Disk /dev/md1: 2247GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1573kB 24.0GB 24.0GB primary linux-swap(v1)
2 24.0GB 54.0GB 30.0GB primary lvm
3 54.0GB 2247GB 2193GB primary lvm
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.