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

overwrite more than one value with names #28472

Merged
merged 1 commit into from Nov 2, 2015

Conversation

gtmanfred
Copy link
Contributor

dockerfiles:
  file.managed:
    - makedirs: True
    - template: jinja
    - names:
      - /builds/archlinux/Dockerfile:
        - source: salt://builds/files/archlinux
      - /builds/deb/Dockerfile:
        - source: salt://builds/files/deb
      - /builds/rpm7/Dockerfile:
        - source: salt://builds/files/rpm
        - context:
            version: centos7
      - /builds/rpm6/Dockerfile:
        - source: salt://builds/files/rpm
        - context:
            version: centos6
      - /builds/rpm5/Dockerfile:
        - source: salt://builds/files/rpm
        - context:
            version: centos5

Without this change, salt will only grab the first entry from the list before
this change. This allows for overwritting and having more variables for
similar files.

```
dockerfiles:
  file.managed:
    - makedirs: True
    - template: jinja
    - names:
      - /builds/archlinux/Dockerfile:
        - source: salt://builds/files/archlinux
      - /builds/deb/Dockerfile:
        - source: salt://builds/files/deb
      - /builds/rpm7/Dockerfile:
        - source: salt://builds/files/rpm
        - context:
            version: centos7
      - /builds/rpm6/Dockerfile:
        - source: salt://builds/files/rpm
        - context:
            version: centos6
      - /builds/rpm5/Dockerfile:
        - source: salt://builds/files/rpm
        - context:
            version: centos5
```

Without this change, salt will only grab the first entry from the list before
this change.  This allows for overwritting and having more variables for
similar files.
@cachedout
Copy link
Contributor

I think this is fine but I'm also going to have @thatch45 take a quick peek. Thanks, @gtmanfred

@cachedout cachedout added the Pending-Discussion The issue or pull request needs more discussion before it can be closed or merged label Nov 2, 2015
@jfindlay jfindlay added Core relates to code central or existential to Salt Expert Change State-Compiler labels Nov 2, 2015
cachedout pushed a commit that referenced this pull request Nov 2, 2015
overwrite more than one value with names
@cachedout cachedout merged commit f3640b3 into saltstack:2015.8 Nov 2, 2015
@cachedout
Copy link
Contributor

This looks good. Thanks @gtmanfred

@gtmanfred
Copy link
Contributor Author

Awesome! thanks! any idea when the next 2015.8 release will be for this? cause I am hotpatching the state.py file right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core relates to code central or existential to Salt Pending-Discussion The issue or pull request needs more discussion before it can be closed or merged State-Compiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants