---

- name: find installed Conda matching packages
  shell: "{{ conda_tests_conda_executable }} search --json {{ conda_tests_install_example }}"
  register: installed_raw

- name: filter output
  set_fact:
    installed: "{{ (installed_raw.stdout | from_json | json_query('%s[?installed]' % conda_tests_install_example)) }}"

- name: ensure expected environment
  assert:
    that: installed | length <= 1

- name: set install facts
  set_fact:
    example_package:
      installed: "{{ installed | length != 0 }}"
      version: "{{ installed[0].version if installed | length > 0 else False }}"

---

- name: find installed Conda matching packages
  shell: "{{ conda_tests_conda_executable }} search --json {{ conda_tests_install_example }}"
  no_log: True
  register: installed_raw

- name: filter output
  set_fact:
    installed: "{{ (installed_raw.stdout | from_json | json_query('%s[?installed]' % conda_tests_install_example)) }}"

- name: ensure expected environment
  assert:
    that: installed | length <= 1

- name: set install facts
  set_fact:
    example_package:
      installed: "{{ installed | length != 0 }}"
      version: "{{ installed[0].version if installed | length > 0 else False }}"

Hide non-important information from test log.
Hide non-important information from test log.
