Question: I am using alamofire in my program to make a call for me and get data. It is stored inside a function that can be called from other classes. The function looks as so:

```
static func searchSong() {
    Alamofire.request(*urlhere*, callback: { response in
        parseData(request)
    }
}

```

And then the method parseData goes through what was returned to me. Now what I want to happen is for searchSong() to actually be able to return the data as I parse it in parseData. How can I get what I have at the end of parseData and return it in searchSong().

I have print statements telling me already I am getting a response and that parseData is working correctly, but I don't know how to get what I have at the end of parseData back to searchSong so that searchSong can return the desired information from where it is called.

Answer: 
You can define extra variables by setting `.extra_vars` property, see `ansible-playbook` cli [code](https://github.com/ansible/ansible/blob/stable-2.3/lib/ansible/cli/playbook.py#L123):

```
    # create the variable manager, which will be shared throughout
    # the code, ensuring a consistent view of global variables
    variable_manager = VariableManager()
    variable_manager.extra_vars = load_extra_vars(loader=loader, options=self.options)

```
You can specify extra variables from within context.CLIARGS. You can specify a file by using `@`.

```
context.CLIARGS = ImmutableDict(connection='local', module_path=['/to/mymodules'], forks=10, become=None,
                            become_method=None, become_user=None, check=False, diff=False,
                            extra_vars={'@/path/to/vars/file', 'key=value'})

```