devops - How do I check for the existence of a conda package before installing in ansible? -


in ansible playbook doing install pillow (using conda):

- name: install pillow   shell: conda list | grep -q -i pillow || conda install --yes -c conda-forge pillow 

two questions:

  1. why fail idempotence test ?
  2. what better way of doing ?

i don't know enough conda know pillow installed to, this:

- name: install pillow   shell: conda list | grep -q -i pillow || conda install --yes -c conda-forge pillow   args:     creates: /path/to/pillow/binary 

Comments

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -