Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check in the names argument is a list in the pkg.installed module #314

Open
roaldnefs opened this issue Oct 20, 2023 · 0 comments
Open

Check in the names argument is a list in the pkg.installed module #314

roaldnefs opened this issue Oct 20, 2023 · 0 comments
Labels
Type: Enhancement New feature or request

Comments

@roaldnefs
Copy link
Member

When using the pkg.installed module it's possible to installed multiple packages by providing a list, e.g.:

example_packages:
  pkg.installed:
    - names: ['package', 'other_package'] 

When the code is updated to only install a single package this can be rewritten to the following:

example_packages:
  pkg.installed:
    - name: package

But when the names argument is kept it will result in the error The 'names' argument in state 'example_packages in SLS 'example' needs to be formed as a list`:

example_packages:
  pkg.installed:
    - names: package

This can be prevented by checking if the names argument in the pkg.installed modules actually contains a list.

@roaldnefs roaldnefs added the Type: Enhancement New feature or request label Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant