* add pyyaml install via task instead of package * Change condition for better consistency in the codebase