lib/ansible_utils/playbook_helpers.rb in ansible-utils-0.1.0 vs lib/ansible_utils/playbook_helpers.rb in ansible-utils-0.1.1

- old
+ new

@@ -8,18 +8,24 @@ def delete_if_exists path FileUtils.remove_entry(path, true) end def paths - @paths ||= roles.map{|role| role['role'] } + @paths ||= roles.map do |role| + if role.is_a?(Hash) + role['role'] + else + role + end + end end def roles playbook['roles'] end def project_folder - @project_folder ||= File.dirname(playbook_path) + @project_folder ||= Dir.pwd end def generic_roles_folder begin if File.file?(config_file_path)