diff --git a/playbooks/install_nnae.yml b/playbooks/install_nnae.yml index cd83b111cccf0ed769c105398f369c79abb10b00..ed05a2b912d8d4896fab102b151dc657abaa5a06 100644 --- a/playbooks/install_nnae.yml +++ b/playbooks/install_nnae.yml @@ -22,6 +22,6 @@ LD_LIBRARY_PATH: /usr/local/python3.7.5/lib register: nnae_result when: nnae.matched > 0 - failed_when: "'install success' not in nnae_result.stdout and 'already installed' not in nnae_result.stdout" + failed_when: "nnae_result.rc != 0 and ('install success' not in nnae_result.stdout and 'already installed' not in nnae_result.stdout)" - debug: var=nnae_result diff --git a/playbooks/install_nnrt.yml b/playbooks/install_nnrt.yml index 06ba7a760a0e3f6f5f8d5f2d338398bfa961f44e..e06eea16b7cb16eb5b02612c16d45826e2fbe504 100644 --- a/playbooks/install_nnrt.yml +++ b/playbooks/install_nnrt.yml @@ -19,6 +19,6 @@ shell: "{{ nnrt.files[0].path }} --install --quiet --install-username={{ user }} --install-usergroup={{ group }}" register: nnrt_result when: nnrt.matched > 0 - failed_when: "'install success' not in nnrt_result.stdout and 'already installed' not in nnrt_result.stdout" + failed_when: "nnrt_result.rc != 0 and ('install success' not in nnrt_result.stdout and 'already installed' not in nnrt_result.stdout)" - debug: var=nnrt_result diff --git a/playbooks/install_tfplugin.yml b/playbooks/install_tfplugin.yml index 5ed208ae1999000c79570f636684c04f57310f6f..70cd15c4adf0b95189f09bad7306bb90e047ef1a 100644 --- a/playbooks/install_tfplugin.yml +++ b/playbooks/install_tfplugin.yml @@ -22,6 +22,6 @@ PATH: /usr/local/python3.7.5/bin:{{ ansible_env.PATH }} register: tfplugin_result when: tfplugin.matched > 0 - failed_when: "'install success' not in tfplugin_result.stdout and 'already installed' not in tfplugin_result.stdout" + failed_when: "tfplugin_result.rc !=0 and ('install success' not in tfplugin_result.stdout and 'already installed' not in tfplugin_result.stdout)" - debug: var=tfplugin_result diff --git a/playbooks/install_toolkit.yml b/playbooks/install_toolkit.yml index 2418ec1c05e33263ab98128c14e140f162e917a9..b82928f6aa7d554913c0ebe622f2881e014bcf65 100644 --- a/playbooks/install_toolkit.yml +++ b/playbooks/install_toolkit.yml @@ -22,6 +22,6 @@ PATH: /usr/local/python3.7.5/bin:{{ ansible_env.PATH }} register: toolkit_result when: toolkit.matched > 0 - failed_when: "'install success' not in toolkit_result.stdout and 'already installed' not in toolkit_result.stdout" + failed_when: "toolkit_result.rc != 0 and ('install success' not in toolkit_result.stdout and 'already installed' not in toolkit_result.stdout)" - debug: var=toolkit_result