def validate(role, _environments, cookbooks, roles) # rubocop:disable CyclomaticComplexity
      # validate the role passed in match the name of either the .rb or .json
      file = %W{roles/#{role}.rb roles/#{role}.json}.find { |f| File.exist?(f) }
      role = role.split("/").last if role =~ /\// # pull out directories
      if file
        c_role = evaluate_c_role(file)
        Spiceweasel::Log.debug("role: '#{role}' name: '#{c_role.name}'")
        unless role.eql?(c_role.name)
          STDERR.puts "ERROR: Role '#{role}' listed in the manifest does not match the name '#{c_role.name}' within the #{file} file."
          exit(-1)
        end
        role_run_list(c_role, cookbooks, role, roles)
      else # role is not here
        STDERR.puts "ERROR: Invalid Role '#{role}' listed in the manifest but not found in the roles directory."
        exit(-1)
      end
    end
def validate(role, _environments, cookbooks, roles) # rubocop:disable CyclomaticComplexity
      # validate the role passed in match the name of either the .rb or .json
      file = %W{roles/#{role}.rb roles/#{role}.json}.find { |f| File.exist?(f) }
      role = role.split("/").last if role =~ /\// # pull out directories
      if file
        c_role = evaluate_c_role(file)
        Spiceweasel::Log.debug("role: '#{role}' name: '#{c_role.name}'")
        unless role.eql?(c_role.name)
          STDERR.puts "ERROR: Role '#{role}' listed in the manifest does not match the name '#{c_role.name}' within the #{file} file."
          exit(-1)
        end
        role_run_list(c_role, cookbooks, role, roles)
      else # role is not here
        STDERR.puts "ERROR: Invalid Role '#{role}' listed in the manifest but not found in the roles directory."
        exit(-1)
      end
    end
validate the content of the role file