class Proxy::Ansible::Api

API endpoints. Most of the code should be calling other classes, please keep the actual implementation of the endpoints outside of this class.

Private Instance Methods

extract_variables(role_name) click to toggle source
# File lib/smart_proxy_ansible/api.rb, line 37
def extract_variables(role_name)
  variables = {}
  RolesReader.roles_path.split(':').each do |path|
    role_path = "#{path}/#{role_name}"
    if File.directory?(role_path)
      variables[role_name] ||= VariablesExtractor
                               .extract_variables(role_path)
    end
  end
  variables
end