refactor cookbook in apt and yum-epal