You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, this does not work when the list 'users' doesn't exist. It just succeeds without doing anything. If I use append: yes instead, it will create the list if neccessary. But then I get duplicates if the item does exist.
I think the source of this difference is that append has the following code, but update doesn't:
Hi, I would like to ensure that an item is in a list. For that I can use
update: yes
:However, this does not work when the list 'users' doesn't exist. It just succeeds without doing anything. If I use
append: yes
instead, it will create the list if neccessary. But then I get duplicates if the item does exist.I think the source of this difference is that
append
has the following code, butupdate
doesn't:ansible-role-yedit/library/yedit.py
Lines 622 to 624 in 0ae7b9c
Could this be added to
update
, or is there another way to achive this?The text was updated successfully, but these errors were encountered: