'Salt: Can I use an argument from the command line as a jinja variable?

Given a file called package-list, I want to do something like:

salt state.sls install-packages list_to_install=package-list

...and then in the sls:

packages:
    pkg.installed:
        - names:
            {% include list_to_install %}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source