From a73d4320784d632191ab86bde0c4785f79d6a184 Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Fri, 8 Nov 2019 14:59:12 +0000 Subject: [PATCH] bindep: Fixed runtime warnings Resolve few ansible runtime warnings. Change-Id: I3e2d5ec3b5b1fc6bbfaded4b8bece035f9880517 --- roles/bindep/tasks/find-bindep.yaml | 1 + roles/bindep/tasks/packages.yaml | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/roles/bindep/tasks/find-bindep.yaml b/roles/bindep/tasks/find-bindep.yaml index 29199bf49..b3a31fb9e 100644 --- a/roles/bindep/tasks/find-bindep.yaml +++ b/roles/bindep/tasks/find-bindep.yaml @@ -7,6 +7,7 @@ - name: Check for system bindep command: /bin/bash -c "type -p bindep" failed_when: false + changed_when: false register: bindep_command_type when: >- bindep_command is not defined diff --git a/roles/bindep/tasks/packages.yaml b/roles/bindep/tasks/packages.yaml index bd3d1555d..73fd80d9a 100644 --- a/roles/bindep/tasks/packages.yaml +++ b/roles/bindep/tasks/packages.yaml @@ -2,19 +2,22 @@ command: "{{ bindep_run }}" register: bindep_output failed_when: false + changed_when: false - name: Install distro packages from bindep package: name: "{{ bindep_output.stdout_lines }}" state: present - become: yes + become: true when: bindep_output.stdout_lines + changed_when: true - name: Check that packages are installed command: "{{ bindep_run }}" register: bindep_final_check # Ignore errors then fail later so that we can give a better error message failed_when: false + changed_when: false - name: Fail if we cannot install all packages fail: