you could set

osfamily=$(facter osfamily)