Last active
May 22, 2017 18:43
-
-
Save omaciel/056c537ef25eddbbd457e8f0da62bc65 to your computer and use it in GitHub Desktop.
Create a Satellite 6 Host + FauxFactory Facts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"facts": | |
{ | |
"architecture": "x86_64", | |
"augeasversion": "1.4.0", | |
"bios_release_date": "06/27/2012", | |
"bios_vendor": "IBM Corp.", | |
"bios_version": "-[JQE150AUS-1.02]-", | |
"blockdevice_sda_model": "ST500NM0011", | |
"blockdevice_sda_size": "500107862016", | |
"blockdevice_sda_vendor": "ATA", | |
"blockdevice_sr0_model": "DEVICE 81Y3657", | |
"blockdevice_sr0_size": "1073741312", | |
"blockdevice_sr0_vendor": "IBM SATA", | |
"blockdevices": "sda,sr0", | |
"boardmanufacturer": "IBM", | |
"boardproductname": "00D3729", | |
"boardserialnumber": "29L0B1", | |
"cpu.cpu(s)": 14, | |
"dhcp_servers": { | |
"enp11s0": "232.168.40.39", | |
"system": "143.69.60.58" | |
}, | |
"distribution.name": "JmHvZKZPhh", | |
"distribution.version": "5.3", | |
"dmi.baseboard.product_name": "qqkAzkGKLB", | |
"dmi.memory.size": "4096", | |
"dmi.system.product_name": "qqkAzkGKLB", | |
"dmi.system.uuid": "34c46e85-0eb2-48cb-96eb-75b8f2d63d5d", | |
"domain": "example.com", | |
"facterversion": "2.4.6", | |
"filesystems": "iso9660,xfs", | |
"fqdn": "faux.example.com", | |
"gid": "root", | |
"hardwareisa": "x86_64", | |
"hardwaremodel": "x86_64", | |
"hostname": "faux", | |
"id": "root", | |
"interfaces": "enp11s0", | |
"ipaddress": "3.78.63.37", | |
"ipaddress6": "7b98:3e58:7bfc:df07:cae1:fcb1:1673:bbd5", | |
"ipaddress6_enp11s0": "1a3:2865:16fe:bc43:e266:6992:2f15:bc48", | |
"ipaddress_enp11s0": "10.19.34.41", | |
"ipaddress_lo": "127.0.0.1", | |
"is_pe": "false", | |
"is_virtual": "false", | |
"kernel": "Linux", | |
"kernelmajversion": "6.7", | |
"kernelrelease": "6.7.5-157.x86_64", | |
"kernelversion": "6.7.5", | |
"lscpu.cpu(s)": 14, | |
"macaddress": "bc:0d:4f:5c:9e:e8", | |
"macaddress_enp11s0": "42:a2:9f:95:47:7b", | |
"manufacturer": "IBM", | |
"memoryfree": "4 GB", | |
"memoryfree_mb": "4096", | |
"memorysize": "70 GB", | |
"memorysize_mb": "71680", | |
"mtu_enp11s0": "1500", | |
"mtu_lo": "65536", | |
"netmask": "255.255.255.248", | |
"netmask_enp11s0": "240.0.0.0", | |
"netmask_lo": "255.252.0.0", | |
"network_enp11s0": "72.61.36.109", | |
"network_lo": "127.0.0.0", | |
"operatingsystem": "JmHvZKZPhh", | |
"operatingsystemmajrelease": 2, | |
"operatingsystemrelease": "5.3", | |
"os": { | |
"family": "GBLTRcDOsG", | |
"name": "JmHvZKZPhh", | |
"release": { | |
"full": "5.3", | |
"major": 5, | |
"minor": 3 | |
} | |
}, | |
"osfamily": "GBLTRcDOsG", | |
"partitions": { | |
"sda1": { | |
"filesystem": "xfs", | |
"mount": "/boot", | |
"size": "1024000", | |
"uuid": "a8ffbe26-bf97-4706-8ca5-0700fb7b47b2" | |
}, | |
"sda2": { | |
"filesystem": "LVM2_member", | |
"size": "975747072" | |
} | |
}, | |
"path": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/sbin", | |
"physicalprocessorcount": "1", | |
"processor0": "Intel(R) Xeon(R) CPU E31220 @ 3.10GHz", | |
"processor1": "Intel(R) Xeon(R) CPU E31220 @ 3.10GHz", | |
"processor10": "Intel(R) Xeon(R) CPU E31220 @ 3.10GHz", | |
"processor11": "Intel(R) Xeon(R) CPU E31220 @ 3.10GHz", | |
"processor12": "Intel(R) Xeon(R) CPU E31220 @ 3.10GHz", | |
"processor13": "Intel(R) Xeon(R) CPU E31220 @ 3.10GHz", | |
"processor2": "Intel(R) Xeon(R) CPU E31220 @ 3.10GHz", | |
"processor3": "Intel(R) Xeon(R) CPU E31220 @ 3.10GHz", | |
"processor4": "Intel(R) Xeon(R) CPU E31220 @ 3.10GHz", | |
"processor5": "Intel(R) Xeon(R) CPU E31220 @ 3.10GHz", | |
"processor6": "Intel(R) Xeon(R) CPU E31220 @ 3.10GHz", | |
"processor7": "Intel(R) Xeon(R) CPU E31220 @ 3.10GHz", | |
"processor8": "Intel(R) Xeon(R) CPU E31220 @ 3.10GHz", | |
"processor9": "Intel(R) Xeon(R) CPU E31220 @ 3.10GHz", | |
"processorcount": 14, | |
"processors": { | |
"count": 14, | |
"models": [ | |
"Intel(R) Xeon(R) CPU E31220 @ 3.10GHz", | |
"Intel(R) Xeon(R) CPU E31220 @ 3.10GHz", | |
"Intel(R) Xeon(R) CPU E31220 @ 3.10GHz", | |
"Intel(R) Xeon(R) CPU E31220 @ 3.10GHz", | |
"Intel(R) Xeon(R) CPU E31220 @ 3.10GHz", | |
"Intel(R) Xeon(R) CPU E31220 @ 3.10GHz", | |
"Intel(R) Xeon(R) CPU E31220 @ 3.10GHz", | |
"Intel(R) Xeon(R) CPU E31220 @ 3.10GHz", | |
"Intel(R) Xeon(R) CPU E31220 @ 3.10GHz", | |
"Intel(R) Xeon(R) CPU E31220 @ 3.10GHz", | |
"Intel(R) Xeon(R) CPU E31220 @ 3.10GHz", | |
"Intel(R) Xeon(R) CPU E31220 @ 3.10GHz", | |
"Intel(R) Xeon(R) CPU E31220 @ 3.10GHz", | |
"Intel(R) Xeon(R) CPU E31220 @ 3.10GHz" | |
], | |
"physicalcount": "1" | |
}, | |
"productname": "qqkAzkGKLB", | |
"ps": "ps -ef", | |
"puppet_vardir": "/var/lib/puppet", | |
"puppetversion": "3.8.6", | |
"root_home": "/root", | |
"rubyplatform": "x86_64-linux", | |
"rubysitedir": "/usr/local/share/ruby/site_ruby/", | |
"rubyversion": "2.0.0", | |
"selinux": "true", | |
"selinux_config_mode": "enforcing", | |
"selinux_config_policy": "targeted", | |
"selinux_current_mode": "enforcing", | |
"selinux_enforced": "true", | |
"selinux_policyversion": "28", | |
"serialnumber": "y0Ur3Hfabk", | |
"sshecdsakey": "AAAAE", | |
"sshed25519key": "AAAAC", | |
"sshfp_ecdsa": "SSHFP 3 1 74e732fc8e7bb5a2dbd7a12f640d8f294ef71fa7", | |
"sshfp_ed25519": "SSHFP 4 1 0cd03c77d5930980f9cc5c9653cdb48eaefe4e08", | |
"sshfp_rsa": "SSHFP 1 1 c34f4c13c6af5c3d7567d6a26415e15f9e5ca974", | |
"sshrsakey": "AAAAB3", | |
"swapfree": "4 GB", | |
"swapfree_mb": "4096", | |
"swapsize": "70 GB", | |
"swapsize_mb": "71680", | |
"system_uptime": { | |
"days": 1894, | |
"hours": 45456, | |
"seconds": 163641600, | |
"uptime": "1894 days" | |
}, | |
"timezone": "EDT", | |
"uniqueid": "KxxGau9wLy", | |
"uptime": "1894 days", | |
"uptime_days": 1894, | |
"uptime_hours": 45456, | |
"uptime_seconds": 163641600, | |
"uuid": "34c46e85-0eb2-48cb-96eb-75b8f2d63d5d", | |
"virtual": "physical" | |
}, | |
"name": "faux.example.com" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a new host | |
curl -vsku 'admin:changeme' -H "Content-type: application/json" -d @host.json "https://${FQDN}/rhsm/environments/1/consumers/" | |
# Upload facts | |
curl -vsku 'admin:changeme' -H 'Content-Type: application/json' -d @facts.json "https://${FQDN}/api/v2/hosts/facts" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name" : "faux.example.com", | |
"type" : "system", | |
"facts" : { | |
"network.hostname" : "faux.example.com" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
here's a richer set of facts I've managed to reverse-engineer. It also contains facts used by Content Host active record (like number of cpus and nw interfaces)
Use it well
: