Refactor and fix idempotency issues with osfamily RedHat.