bindep: Fixed runtime warnings

Resolve few ansible runtime warnings.

Change-Id: I3e2d5ec3b5b1fc6bbfaded4b8bece035f9880517
This commit is contained in:
Sorin Sbarnea 2019-11-08 14:59:12 +00:00
parent 1e92a67db6
commit a73d432078
2 changed files with 5 additions and 1 deletions

View File

@ -7,6 +7,7 @@
- name: Check for system bindep - name: Check for system bindep
command: /bin/bash -c "type -p bindep" command: /bin/bash -c "type -p bindep"
failed_when: false failed_when: false
changed_when: false
register: bindep_command_type register: bindep_command_type
when: >- when: >-
bindep_command is not defined bindep_command is not defined

View File

@ -2,19 +2,22 @@
command: "{{ bindep_run }}" command: "{{ bindep_run }}"
register: bindep_output register: bindep_output
failed_when: false failed_when: false
changed_when: false
- name: Install distro packages from bindep - name: Install distro packages from bindep
package: package:
name: "{{ bindep_output.stdout_lines }}" name: "{{ bindep_output.stdout_lines }}"
state: present state: present
become: yes become: true
when: bindep_output.stdout_lines when: bindep_output.stdout_lines
changed_when: true
- name: Check that packages are installed - name: Check that packages are installed
command: "{{ bindep_run }}" command: "{{ bindep_run }}"
register: bindep_final_check register: bindep_final_check
# Ignore errors then fail later so that we can give a better error message # Ignore errors then fail later so that we can give a better error message
failed_when: false failed_when: false
changed_when: false
- name: Fail if we cannot install all packages - name: Fail if we cannot install all packages
fail: fail: