Unable to use $facts as a hash in the puppet manifest
问题 Here is the manifest code which is failing: each( $facts['partitions'] ) |$name, $device| { notice( "${facts['hostname']} has device ${name} with size ${device['size']}" ) } The error: [manifests]$puppet apply /vagrant/manifests/mountpoints.pp Error: Evaluation Error: Operator '[]' is not applicable to an Undef Value. at /vagrant/manifests/mountpoints.pp:1:7 on node siy Error: Evaluation Error: Operator '[]' is not applicable to an Undef Value. at /vagrant/manifests/mountpoints.pp:1:7 on node