salt: salt.states.grains.list_present adds duplicates names
Hi,
I noticed that using the ‘grains’ state multiple times results in duplicate list items. One would expect that the grains state immediately updates the roles grains after modifying it.
For example this state
# set roles
roles-nginx:
grains.list_present:
- name: roles
- value:
- webserver
- webserver-nginx
- require:
- service: nginx-service
roles-nginx-php-fpm:
grains.list_present:
- name: roles
- value:
- php
- php-fpm
- webserver
- webserver-nginx
- webserver-nginx-php-fpm
yields this result
zsh 386 # salt minion grains.item roles
minion:
----------
roles:
- webserver
- webserver-nginx
- php
- php-fpm
- webserver
- webserver-nginx
- webserver-nginx-php-fpm
Is this a bug or a feature? It feels wrong to force a grain update in the state file?
About this issue
- Original URL
- State: open
- Created 8 years ago
- Reactions: 1
- Comments: 16 (11 by maintainers)
This is a legit bug and should be fixable in minutes
@githubcdr, I get the following results on 2015.8.3 and 2015.8.7.