Cache facts and upload to foreman when they change

Tests ok here.