Fix ansible-lint warnings

Change-Id: I4980b5577984f673eec23ce9a07fccf26fbcd875
diff --git a/engine/installer/kolla/playbooks/post-deployment.yml b/engine/installer/kolla/playbooks/post-deployment.yml
index 55cf1c2..5f41aad 100644
--- a/engine/installer/kolla/playbooks/post-deployment.yml
+++ b/engine/installer/kolla/playbooks/post-deployment.yml
@@ -47,7 +47,7 @@
       include_role:
         name: "{{ engine_cache }}/repos/swconfig/{{ scenario[deploy_scenario].installers[installer_type].role }}"
         tasks_from: post-deployment
-      when: hostvars['localhost'].post_deployment_yml.stat.exists == True
+      when: hostvars['localhost'].post_deployment_yml.stat.exists
 
 # run common post-deployment tasks
 - hosts: localhost
diff --git a/engine/installer/kolla/playbooks/pre-deployment.yml b/engine/installer/kolla/playbooks/pre-deployment.yml
index a7c3e07..06fbafd 100644
--- a/engine/installer/kolla/playbooks/pre-deployment.yml
+++ b/engine/installer/kolla/playbooks/pre-deployment.yml
@@ -47,6 +47,6 @@
       include_role:
         name: "{{ engine_cache }}/repos/swconfig/{{ scenario[deploy_scenario].installers[installer_type].role }}"
         tasks_from: pre-deployment
-      when: hostvars['localhost'].pre_deployment_yml.stat.exists == True
+      when: hostvars['localhost'].pre_deployment_yml.stat.exists
 
 # vim: set ts=2 sw=2 expandtab:
diff --git a/engine/installer/kolla/playbooks/roles/configure-installer/tasks/main.yml b/engine/installer/kolla/playbooks/roles/configure-installer/tasks/main.yml
index fe95d32..7db1dfa 100644
--- a/engine/installer/kolla/playbooks/roles/configure-installer/tasks/main.yml
+++ b/engine/installer/kolla/playbooks/roles/configure-installer/tasks/main.yml
@@ -90,5 +90,6 @@
 
 - name: Generate kolla passwords
   command: "{{ kolla_ansible_path }}/tools/generate_passwords.py -p {{ config_path }}/passwords.yml"
+  changed_when: false
 
 # vim: set ts=2 sw=2 expandtab:
diff --git a/engine/installer/kolla/playbooks/roles/configure-targethosts/tasks/configure-network-Debian.yml b/engine/installer/kolla/playbooks/roles/configure-targethosts/tasks/configure-network-Debian.yml
index d7c87a6..c45edc9 100644
--- a/engine/installer/kolla/playbooks/roles/configure-targethosts/tasks/configure-network-Debian.yml
+++ b/engine/installer/kolla/playbooks/roles/configure-targethosts/tasks/configure-network-Debian.yml
@@ -52,8 +52,10 @@
 - name: Compute mapping dict from mac address to device name
   set_fact:
     device_mac_dict: "{{ (device_mac_dict | default({})) | combine({item.macaddress: item.device}) }}"
-  loop: "{{ ansible_interfaces | map('regex_replace', '-', '_') | map('regex_replace', '^', 'ansible_') | map('extract', hostvars[inventory_hostname]) |  selectattr('macaddress','defined') | list }}"
-  when: "{{ '.' not in item.device }}"
+  loop: |-
+      {{ ansible_interfaces | map('regex_replace', '-', '_') | map('regex_replace', '^', 'ansible_') |
+      map('extract', hostvars[inventory_hostname]) |  selectattr('macaddress','defined') | list }}
+  when: "'.' not in item.device"
 
 - name: Filter to include only configured ethernet interfaces
   set_fact:
@@ -70,7 +72,7 @@
   lineinfile:
     path: /etc/systemd/resolved.conf
     regexp: "^#?DNS=.*$"
-    line: "DNS={{ idf.net_config[engine.public_network | default('public')].dns | join(' ')}}"
+    line: "DNS={{ idf.net_config[engine.public_network | default('public')].dns | join(' ') }}"
   when: idf.net_config[engine.public_network | default('public')].dns is defined
 
 - name: Proxy configuration for apt
@@ -84,7 +86,7 @@
     file:
       path: /etc/apt/apt.conf
       state: touch
-    when: stat_result.stat.exists == False
+    when: not stat_result.stat.exists
 
   - name: Add proxy setting to /etc/apt/apt.conf
     lineinfile:
@@ -102,6 +104,7 @@
   shell: "sleep 5 && reboot"
   async: 1
   poll: 0
+  changed_when: false
 
 - name: Wait for host to come back to life
   wait_for_connection:
diff --git a/engine/installer/kolla/playbooks/roles/configure-targethosts/tasks/configure-network-RedHat.yml b/engine/installer/kolla/playbooks/roles/configure-targethosts/tasks/configure-network-RedHat.yml
index f4b0318..3d605bb 100644
--- a/engine/installer/kolla/playbooks/roles/configure-targethosts/tasks/configure-network-RedHat.yml
+++ b/engine/installer/kolla/playbooks/roles/configure-targethosts/tasks/configure-network-RedHat.yml
@@ -32,8 +32,10 @@
 - name: Compute mapping dict from mac address to device name
   set_fact:
     device_mac_dict: "{{ (device_mac_dict | default({})) | combine({item.macaddress: item.device}) }}"
-  loop: "{{ ansible_interfaces | map('regex_replace', '-', '_') | map('regex_replace', '^', 'ansible_') | map('extract', hostvars[inventory_hostname]) |  selectattr('macaddress','defined') | list }}"
-  when: "{{ '.' not in item.device }}"
+  loop: |-
+      {{ ansible_interfaces | map('regex_replace', '-', '_') | map('regex_replace', '^', 'ansible_') |
+      map('extract', hostvars[inventory_hostname]) |  selectattr('macaddress','defined') | list }}
+  when: "'.' not in item.device"
 
 - name: Filter to include only configured ethernet interfaces
   set_fact:
@@ -58,7 +60,7 @@
     file:
       path: /etc/yum.conf
       state: touch
-    when: stat_result.stat.exists == False
+    when: not stat_result.stat.exists
 
   - name: Add proxy setting to /etc/yum.conf
     lineinfile:
diff --git a/engine/installer/kolla/playbooks/roles/configure-targethosts/tasks/create-swap.yml b/engine/installer/kolla/playbooks/roles/configure-targethosts/tasks/create-swap.yml
index 6e6e603..2387417 100644
--- a/engine/installer/kolla/playbooks/roles/configure-targethosts/tasks/create-swap.yml
+++ b/engine/installer/kolla/playbooks/roles/configure-targethosts/tasks/create-swap.yml
@@ -26,8 +26,9 @@
 
 - block:
   - name: Create swap file
-    command: |
-      fallocate -l 4096M /swapfile
+    command: "fallocate -l 4096M /swapfile"
+    args:
+      creates: /swapfile
 
   - name: Set swap file permissions
     file:
@@ -38,10 +39,12 @@
       mode: "0600"
 
   - name: Initialize swap file
-    command: mkswap /swapfile
+    command: "mkswap /swapfile"
+    changed_when: false
 
   - name: Enable swap file
-    command: swapon /swapfile
+    command: "swapon /swapfile"
+    changed_when: false
 
   - name: Manage swap file in /etc/fstab
     mount:
@@ -52,6 +55,6 @@
       dump: "0"
       passno: "0"
       state: present
-  when: swap.stat.exists == False
+  when: not swap.stat.exists
 
 # vim: set ts=2 sw=2 expandtab:
diff --git a/engine/installer/kolla/playbooks/roles/configure-targethosts/tasks/install-packages-RedHat.yml b/engine/installer/kolla/playbooks/roles/configure-targethosts/tasks/install-packages-RedHat.yml
index 569ae29..f9257b6 100644
--- a/engine/installer/kolla/playbooks/roles/configure-targethosts/tasks/install-packages-RedHat.yml
+++ b/engine/installer/kolla/playbooks/roles/configure-targethosts/tasks/install-packages-RedHat.yml
@@ -17,7 +17,7 @@
 # SPDX-License-Identifier: Apache-2.0
 # ============LICENSE_END=========================================================
 - name: Install packages
-  action: >
+  action: |
     {{ ansible_pkg_mgr }} name={{ item }} state=present update_cache=yes
   with_items:
     - "yum-utils"
diff --git a/engine/installer/kolla/playbooks/roles/configure-targethosts/tasks/prepare-cinder-lvm-backend.yml b/engine/installer/kolla/playbooks/roles/configure-targethosts/tasks/prepare-cinder-lvm-backend.yml
index 6e50631..a8875ee 100644
--- a/engine/installer/kolla/playbooks/roles/configure-targethosts/tasks/prepare-cinder-lvm-backend.yml
+++ b/engine/installer/kolla/playbooks/roles/configure-targethosts/tasks/prepare-cinder-lvm-backend.yml
@@ -51,23 +51,29 @@
       path: "{{ cinder_image_path }}"
       state: absent
     ignore_errors: yes
-  when: cinder_image.stat.exists == True
+  when: cinder_image.stat.exists
 
 - name: Get free loopback device
   command: "losetup -f"
   register: free_device
+  changed_when: false
 
-- set_fact:
+- name: Set loopback device name
+  set_fact:
     loopback_device_name: "{{ free_device.stdout }}"
 
 - name: Create cinder image
   command: "fallocate -l {{ cinder_image_size }} {{ cinder_image_path }}"
+  args:
+    creates: "{{ cinder_image_path }}"
 
 - name: Setup loopback device
   command: "losetup {{ loopback_device_name }} {{ cinder_image_path }}"
+  changed_when: false
 
 - name: Create PV on the loopback device
   command: "pvcreate {{ loopback_device_name }}"
+  changed_when: false
 
 - name: Add cinder-volumes volume group
   lvg:
diff --git a/engine/installer/kolla/playbooks/roles/configure-targethosts/tasks/sync-time.yml b/engine/installer/kolla/playbooks/roles/configure-targethosts/tasks/sync-time.yml
index 1c96d12..97743a5 100644
--- a/engine/installer/kolla/playbooks/roles/configure-targethosts/tasks/sync-time.yml
+++ b/engine/installer/kolla/playbooks/roles/configure-targethosts/tasks/sync-time.yml
@@ -20,13 +20,13 @@
   include_vars: '{{ ansible_os_family }}.yml'
 
 - name: Remove NTP if installed
-  action: >
+  action: |
     {{ ansible_pkg_mgr }} name={{ item }} state=absent update_cache=yes
   with_items:
     - "ntp"
 
 - name: Install Chrony
-  action: >
+  action: |
     {{ ansible_pkg_mgr }} name={{ item }} state=present update_cache=yes
   with_items:
     - "chrony"
@@ -49,7 +49,11 @@
 
 
 - name: "NTP should be synchronized"
-  shell: timedatectl  | grep 'synchronized'
+  shell: |
+      set -o pipefail
+      timedatectl  | grep 'synchronized'
+  args:
+    executable: /bin/bash
   register: synchronized
   changed_when: false
   until: "'yes' in synchronized.stdout"
diff --git a/engine/installer/kolla/playbooks/roles/post-deployment/tasks/main.yml b/engine/installer/kolla/playbooks/roles/post-deployment/tasks/main.yml
index 9c4fe74..6cf3d00 100644
--- a/engine/installer/kolla/playbooks/roles/post-deployment/tasks/main.yml
+++ b/engine/installer/kolla/playbooks/roles/post-deployment/tasks/main.yml
@@ -36,7 +36,7 @@
     enable_dhcp: no
     network_name: "{{ external_network }}"
     name: "{{ external_subnet }}"
-    cidr: "{{ idf.net_config.neutron.network}}/{{ idf.net_config.neutron.mask }}"
+    cidr: "{{ idf.net_config.neutron.network }}/{{ idf.net_config.neutron.mask }}"
     gateway_ip: "{{ idf.net_config.neutron.network | regex_replace('.0$', '.1') }}"
     allocation_pool_start: "{{ idf.net_config.neutron.network | regex_replace('.0$', '.51') }}"
     allocation_pool_end: "{{ idf.net_config.neutron.network | regex_replace('.0$', '.250') }}"
diff --git a/engine/installer/kubespray/playbooks/post-deployment.yml b/engine/installer/kubespray/playbooks/post-deployment.yml
index 5edc214..c1ed013 100644
--- a/engine/installer/kubespray/playbooks/post-deployment.yml
+++ b/engine/installer/kubespray/playbooks/post-deployment.yml
@@ -47,7 +47,7 @@
       include_role:
         name: "{{ engine_cache }}/repos/swconfig/{{ scenario[deploy_scenario].installers[installer_type].role }}"
         tasks_from: post-deployment
-      when: hostvars['localhost'].post_deployment_yml.stat.exists == True
+      when: hostvars['localhost'].post_deployment_yml.stat.exists
 
 # run common post-deployment tasks
 # NOTE: The common post-deployment tasks is currently applicable only to
diff --git a/engine/installer/kubespray/playbooks/pre-deployment.yml b/engine/installer/kubespray/playbooks/pre-deployment.yml
index fc44c39..e6ae9e1 100644
--- a/engine/installer/kubespray/playbooks/pre-deployment.yml
+++ b/engine/installer/kubespray/playbooks/pre-deployment.yml
@@ -47,6 +47,6 @@
       include_role:
         name: "{{ engine_cache }}/repos/swconfig/{{ scenario[deploy_scenario].installers[installer_type].role }}"
         tasks_from: pre-deployment
-      when: hostvars['localhost'].pre_deployment_yml.stat.exists == True
+      when: hostvars['localhost'].pre_deployment_yml.stat.exists
 
 # vim: set ts=2 sw=2 expandtab:
diff --git a/engine/installer/kubespray/playbooks/roles/configure-targethosts/tasks/configure-network-Debian.yml b/engine/installer/kubespray/playbooks/roles/configure-targethosts/tasks/configure-network-Debian.yml
index d7c87a6..d113e50 100644
--- a/engine/installer/kubespray/playbooks/roles/configure-targethosts/tasks/configure-network-Debian.yml
+++ b/engine/installer/kubespray/playbooks/roles/configure-targethosts/tasks/configure-network-Debian.yml
@@ -52,8 +52,10 @@
 - name: Compute mapping dict from mac address to device name
   set_fact:
     device_mac_dict: "{{ (device_mac_dict | default({})) | combine({item.macaddress: item.device}) }}"
-  loop: "{{ ansible_interfaces | map('regex_replace', '-', '_') | map('regex_replace', '^', 'ansible_') | map('extract', hostvars[inventory_hostname]) |  selectattr('macaddress','defined') | list }}"
-  when: "{{ '.' not in item.device }}"
+  loop: |-
+      {{ ansible_interfaces | map('regex_replace', '-', '_') | map('regex_replace', '^', 'ansible_') |
+      map('extract', hostvars[inventory_hostname]) |  selectattr('macaddress','defined') | list }}
+  when: "'.' not in item.device"
 
 - name: Filter to include only configured ethernet interfaces
   set_fact:
@@ -70,7 +72,7 @@
   lineinfile:
     path: /etc/systemd/resolved.conf
     regexp: "^#?DNS=.*$"
-    line: "DNS={{ idf.net_config[engine.public_network | default('public')].dns | join(' ')}}"
+    line: "DNS={{ idf.net_config[engine.public_network | default('public')].dns | join(' ') }}"
   when: idf.net_config[engine.public_network | default('public')].dns is defined
 
 - name: Proxy configuration for apt
@@ -84,7 +86,7 @@
     file:
       path: /etc/apt/apt.conf
       state: touch
-    when: stat_result.stat.exists == False
+    when: not stat_result.stat.exists
 
   - name: Add proxy setting to /etc/apt/apt.conf
     lineinfile:
@@ -95,13 +97,13 @@
     with_items:
       - {name: 'Acquire::http::Proxy', value: '"{{ idf.proxy_settings.http_proxy }}";' }
       - {name: 'Acquire::https::Proxy', value: '"{{ idf.proxy_settings.https_proxy }}";' }
-  when:
-    idf.proxy_settings is defined
+  when: idf.proxy_settings is defined
 
 - name: Reboot the machine
   shell: "sleep 5 && reboot"
   async: 1
   poll: 0
+  changed_when: false
 
 - name: Wait for host to come back to life
   wait_for_connection:
diff --git a/engine/installer/kubespray/playbooks/roles/configure-targethosts/tasks/configure-network-RedHat.yml b/engine/installer/kubespray/playbooks/roles/configure-targethosts/tasks/configure-network-RedHat.yml
index f4b0318..3d605bb 100644
--- a/engine/installer/kubespray/playbooks/roles/configure-targethosts/tasks/configure-network-RedHat.yml
+++ b/engine/installer/kubespray/playbooks/roles/configure-targethosts/tasks/configure-network-RedHat.yml
@@ -32,8 +32,10 @@
 - name: Compute mapping dict from mac address to device name
   set_fact:
     device_mac_dict: "{{ (device_mac_dict | default({})) | combine({item.macaddress: item.device}) }}"
-  loop: "{{ ansible_interfaces | map('regex_replace', '-', '_') | map('regex_replace', '^', 'ansible_') | map('extract', hostvars[inventory_hostname]) |  selectattr('macaddress','defined') | list }}"
-  when: "{{ '.' not in item.device }}"
+  loop: |-
+      {{ ansible_interfaces | map('regex_replace', '-', '_') | map('regex_replace', '^', 'ansible_') |
+      map('extract', hostvars[inventory_hostname]) |  selectattr('macaddress','defined') | list }}
+  when: "'.' not in item.device"
 
 - name: Filter to include only configured ethernet interfaces
   set_fact:
@@ -58,7 +60,7 @@
     file:
       path: /etc/yum.conf
       state: touch
-    when: stat_result.stat.exists == False
+    when: not stat_result.stat.exists
 
   - name: Add proxy setting to /etc/yum.conf
     lineinfile:
diff --git a/engine/installer/kubespray/playbooks/roles/configure-targethosts/tasks/install-packages-Debian.yml b/engine/installer/kubespray/playbooks/roles/configure-targethosts/tasks/install-packages-Debian.yml
index abeb41a..16c3fe3 100644
--- a/engine/installer/kubespray/playbooks/roles/configure-targethosts/tasks/install-packages-Debian.yml
+++ b/engine/installer/kubespray/playbooks/roles/configure-targethosts/tasks/install-packages-Debian.yml
@@ -41,7 +41,7 @@
 
 - name: Add docker apt repository
   apt_repository:
-    repo: "deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_lsb.codename}} stable"
+    repo: "deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_lsb.codename }} stable"
     state: present
 
 - name: Install docker version {{ docker_ce_version }}
diff --git a/engine/installer/kubespray/playbooks/roles/configure-targethosts/tasks/install-packages-RedHat.yml b/engine/installer/kubespray/playbooks/roles/configure-targethosts/tasks/install-packages-RedHat.yml
index 95e9af3..40a797d 100644
--- a/engine/installer/kubespray/playbooks/roles/configure-targethosts/tasks/install-packages-RedHat.yml
+++ b/engine/installer/kubespray/playbooks/roles/configure-targethosts/tasks/install-packages-RedHat.yml
@@ -17,7 +17,7 @@
 # SPDX-License-Identifier: Apache-2.0
 # ============LICENSE_END=========================================================
 - name: Install packages
-  action: >
+  action: |
     {{ ansible_pkg_mgr }} name={{ item }} state=present update_cache=yes
   with_items:
     - "yum-utils"
@@ -32,9 +32,10 @@
   command: "yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo"
   register: yumcfg_status
   become: yes
+  changed_when: false
 
 - name: Install docker
-  action: >
+  action: |
     {{ ansible_pkg_mgr }} name={{ item }} state=present update_cache=yes
   with_items:
     - "docker-ce"
diff --git a/engine/installer/kubespray/playbooks/roles/configure-targethosts/tasks/install-packages.yml b/engine/installer/kubespray/playbooks/roles/configure-targethosts/tasks/install-packages.yml
index b303210..3d5beb5 100644
--- a/engine/installer/kubespray/playbooks/roles/configure-targethosts/tasks/install-packages.yml
+++ b/engine/installer/kubespray/playbooks/roles/configure-targethosts/tasks/install-packages.yml
@@ -31,7 +31,7 @@
     file:
       path: "/etc/systemd/system/docker.service.d"
       state: directory
-    when: dir_stats.stat.exists == False
+    when: not dir_stats.stat.exists
 
   - name: Create proxy conf file under /etc/systemd/system/docker.service.d/
     file:
diff --git a/engine/installer/kubespray/playbooks/roles/configure-targethosts/tasks/sync-time.yml b/engine/installer/kubespray/playbooks/roles/configure-targethosts/tasks/sync-time.yml
index 1c96d12..97743a5 100644
--- a/engine/installer/kubespray/playbooks/roles/configure-targethosts/tasks/sync-time.yml
+++ b/engine/installer/kubespray/playbooks/roles/configure-targethosts/tasks/sync-time.yml
@@ -20,13 +20,13 @@
   include_vars: '{{ ansible_os_family }}.yml'
 
 - name: Remove NTP if installed
-  action: >
+  action: |
     {{ ansible_pkg_mgr }} name={{ item }} state=absent update_cache=yes
   with_items:
     - "ntp"
 
 - name: Install Chrony
-  action: >
+  action: |
     {{ ansible_pkg_mgr }} name={{ item }} state=present update_cache=yes
   with_items:
     - "chrony"
@@ -49,7 +49,11 @@
 
 
 - name: "NTP should be synchronized"
-  shell: timedatectl  | grep 'synchronized'
+  shell: |
+      set -o pipefail
+      timedatectl  | grep 'synchronized'
+  args:
+    executable: /bin/bash
   register: synchronized
   changed_when: false
   until: "'yes' in synchronized.stdout"
diff --git a/engine/installer/kubespray/playbooks/roles/post-deployment/tasks/configure-jumphost.yml b/engine/installer/kubespray/playbooks/roles/post-deployment/tasks/configure-jumphost.yml
index 2281682..e9dd54e 100644
--- a/engine/installer/kubespray/playbooks/roles/post-deployment/tasks/configure-jumphost.yml
+++ b/engine/installer/kubespray/playbooks/roles/post-deployment/tasks/configure-jumphost.yml
@@ -18,7 +18,7 @@
 # ============LICENSE_END=========================================================
 
 - name: Install pip
-  action: >
+  action: |
     {{ ansible_pkg_mgr }} name={{ item }} state=present update_cache=yes
   with_items:
     - "python-pip"
diff --git a/engine/provisioner/bifrost/playbooks/create-libvirt-resources.yml b/engine/provisioner/bifrost/playbooks/create-libvirt-resources.yml
index 3d67ab3..73638ad 100644
--- a/engine/provisioner/bifrost/playbooks/create-libvirt-resources.yml
+++ b/engine/provisioner/bifrost/playbooks/create-libvirt-resources.yml
@@ -36,6 +36,7 @@
     - name: Get libvirt networks
       command: virsh net-list --all
       register: libvirt_networks
+      changed_when: false
 
     - name: List libvirt networks
       debug:
@@ -44,6 +45,7 @@
     - name: Get libvirt vms
       command: virsh list --all
       register: libvirt_vms
+      changed_when: false
 
     - name: List libvirt vms
       debug:
@@ -51,9 +53,10 @@
 
     - name: Get list of nodes from vbmc
       command: vbmc list
+      register: vbmc_vms
+      changed_when: false
       environment:
         PATH: "{{ engine_venv }}/bin"
-      register: vbmc_vms
 
     - name: List vbmc nodes
       debug:
diff --git a/engine/provisioner/bifrost/playbooks/main.yml b/engine/provisioner/bifrost/playbooks/main.yml
index fa12357..7c144bb 100644
--- a/engine/provisioner/bifrost/playbooks/main.yml
+++ b/engine/provisioner/bifrost/playbooks/main.yml
@@ -19,7 +19,7 @@
 
 - name: Create libvirt resources
   import_playbook: create-libvirt-resources.yml
-  when: baremetal|bool == false
+  when: not baremetal|bool
 
 - name: Install and configure bifrost
   import_playbook: install-configure-bifrost.yml
diff --git a/engine/provisioner/bifrost/playbooks/roles/create-libvirt-vms/tasks/create-libvirt-vms.yml b/engine/provisioner/bifrost/playbooks/roles/create-libvirt-vms/tasks/create-libvirt-vms.yml
index 70e131e..a2f0eda 100644
--- a/engine/provisioner/bifrost/playbooks/roles/create-libvirt-vms/tasks/create-libvirt-vms.yml
+++ b/engine/provisioner/bifrost/playbooks/roles/create-libvirt-vms/tasks/create-libvirt-vms.yml
@@ -91,12 +91,16 @@
     virtual_ipmi_port: "{{ ( node.remote_management.port | default(623) | int ) }}"
 
 - name: Plug vm '{{ hostname }}' into vbmc on port '{{ virtual_ipmi_port }}'
-  command: "vbmc add {{ hostname }} --libvirt-uri {{ vm_libvirt_uri }} --port {{ virtual_ipmi_port }}"
+  command: "vbmc add {{ hostname }} --libvirt-uri {{ vm_libvirt_uri }} --port {{ virtual_ipmi_port }} --verbose"
+  register: vbmc_add
+  args:
+    creates: "{{ ansible_env.HOME }}/.vbmc/{{ hostname }}"
   environment:
     PATH: "{{ engine_venv }}/bin"
 
 - name: Start vbmc for '{{ hostname }}'
-  command: "vbmc start {{ hostname }}"
+  command: "vbmc start {{ hostname }} --verbose"
+  when: not vbmc_add.stdout
   environment:
     PATH: "{{ engine_venv }}/bin"
 
diff --git a/engine/provisioner/bifrost/playbooks/roles/create-libvirt-vms/tasks/create-libvirt-volumes.yml b/engine/provisioner/bifrost/playbooks/roles/create-libvirt-vms/tasks/create-libvirt-volumes.yml
index a5de66b..75e9fbc 100644
--- a/engine/provisioner/bifrost/playbooks/roles/create-libvirt-vms/tasks/create-libvirt-volumes.yml
+++ b/engine/provisioner/bifrost/playbooks/roles/create-libvirt-vms/tasks/create-libvirt-volumes.yml
@@ -23,16 +23,20 @@
     vm_vol_path_prefix: "{{ ansible_libvirt_pools[libvirt_storage_pool].path }}/{{ hostname }}"
 
 - name: Delete volume '{{ vm_volume_name }}' for vm '{{ hostname }}'
-  command: >
+  command: |
     virsh --connect {{ vm_libvirt_uri }}
     vol-delete --pool {{ libvirt_storage_pool }} {{ vm_volume_name }}
+  args:
+    removes: "{{ vm_vol_path_prefix }}-{{ disk.name }}.qcow2"
   ignore_errors: yes
 
 - name: Create volume '{{ vm_volume_name }}' for vm '{{ hostname }}'
-  command: >
+  command: |
     virsh --connect {{ vm_libvirt_uri }}
-      vol-create-as {{ libvirt_storage_pool }} {{ vm_volume_name }}
+    vol-create-as {{ libvirt_storage_pool }} {{ vm_volume_name }}
       {{ disk.disk_capacity }} --format qcow2 {{ prealloc|default("") }}
+  args:
+    creates: "{{ vm_vol_path_prefix }}-{{ disk.name }}.qcow2"
 
 - name: Pre-touch volume '{{ vm_volume_name }}' for vm '{{ hostname }}'
   file:
diff --git a/engine/provisioner/bifrost/playbooks/roles/create-libvirt-vms/tasks/main.yml b/engine/provisioner/bifrost/playbooks/roles/create-libvirt-vms/tasks/main.yml
index 0defb0c..6205742 100644
--- a/engine/provisioner/bifrost/playbooks/roles/create-libvirt-vms/tasks/main.yml
+++ b/engine/provisioner/bifrost/playbooks/roles/create-libvirt-vms/tasks/main.yml
@@ -26,6 +26,8 @@
 
 - name: Stop existing virtualbmc processes
   command: killall -w vbmc
+  args:
+    removes: "{{ ansible_env.HOME }}/.vbmc/master.pid"
   ignore_errors: yes
 
 - name: Remove outdated virtualbmc folder
diff --git a/engine/provisioner/bifrost/playbooks/roles/get-baremetal-info/tasks/main.yml b/engine/provisioner/bifrost/playbooks/roles/get-baremetal-info/tasks/main.yml
index 9fa6b0f..aca6313 100644
--- a/engine/provisioner/bifrost/playbooks/roles/get-baremetal-info/tasks/main.yml
+++ b/engine/provisioner/bifrost/playbooks/roles/get-baremetal-info/tasks/main.yml
@@ -29,20 +29,28 @@
 
 - name: Fetch mgmt network interface name
   set_fact:
-    mgmt_ifname: "{{ (node.interfaces[idf.net_config.mgmt.interface].vlan == 'native') | ternary(interface.device, interface.device + '.' + node.interfaces[idf.net_config.mgmt.interface].vlan) }}"
-  loop: "{{ ansible_interfaces | map('regex_replace', '-', '_') | map('regex_replace', '^', 'ansible_') | map('extract', hostvars[inventory_hostname]) |  selectattr('macaddress','defined') | list }}"
+    mgmt_ifname: |-
+      {{ (node.interfaces[idf.net_config.mgmt.interface].vlan == 'native') |
+      ternary(interface.device, interface.device + '.' + node.interfaces[idf.net_config.mgmt.interface].vlan) }}
+  loop: |-
+      {{ ansible_interfaces | map('regex_replace', '-', '_') | map('regex_replace', '^', 'ansible_') |
+      map('extract', hostvars[inventory_hostname]) |  selectattr('macaddress','defined') | list }}
   loop_control:
     loop_var: interface
   when:
     - interface.macaddress == node.interfaces[idf.net_config.mgmt.interface].mac_address
-    - "{{ '.' not in interface.device }}"
+    - "'.' not in interface.device"
 
 - name: Fetch neutron network interface name
   set_fact:
-    neutron_ifname: "{{ (node.interfaces[idf.net_config.neutron.interface].vlan == 'native') | ternary(interface.device, interface.device + '.' + node.interfaces[idf.net_config.neutron.interface].vlan) }}"
-  loop: "{{ ansible_interfaces | map('regex_replace', '-', '_') | map('regex_replace', '^', 'ansible_') | map('extract', hostvars[inventory_hostname]) |  selectattr('macaddress','defined') | list }}"
+    neutron_ifname: |-
+      {{ (node.interfaces[idf.net_config.neutron.interface].vlan == 'native') |
+      ternary(interface.device, interface.device + '.' + node.interfaces[idf.net_config.neutron.interface].vlan) }}
+  loop: |-
+      {{ ansible_interfaces | map('regex_replace', '-', '_') | map('regex_replace', '^', 'ansible_') |
+      map('extract', hostvars[inventory_hostname]) |  selectattr('macaddress','defined') | list }}
   loop_control:
     loop_var: interface
   when:
     - interface.macaddress == node.interfaces[idf.net_config.neutron.interface].mac_address
-    - "{{ '.' not in interface.device }}"
+    - "'.' not in interface.device"
diff --git a/engine/provisioner/bifrost/playbooks/roles/install-configure-bifrost/tasks/cleanup-bifrost.yml b/engine/provisioner/bifrost/playbooks/roles/install-configure-bifrost/tasks/cleanup-bifrost.yml
index 1270e86..4a51eb8 100644
--- a/engine/provisioner/bifrost/playbooks/roles/install-configure-bifrost/tasks/cleanup-bifrost.yml
+++ b/engine/provisioner/bifrost/playbooks/roles/install-configure-bifrost/tasks/cleanup-bifrost.yml
@@ -20,6 +20,7 @@
   command: killall -w dnsmasq
   ignore_errors: yes
   become: yes
+  changed_when: false
 
 - name: Remove existing files and directories
   file:
diff --git a/engine/provisioner/bifrost/playbooks/roles/install-configure-bifrost/tasks/create-bifrost-inventory-file.yml b/engine/provisioner/bifrost/playbooks/roles/install-configure-bifrost/tasks/create-bifrost-inventory-file.yml
index d16a050..95d8016 100644
--- a/engine/provisioner/bifrost/playbooks/roles/install-configure-bifrost/tasks/create-bifrost-inventory-file.yml
+++ b/engine/provisioner/bifrost/playbooks/roles/install-configure-bifrost/tasks/create-bifrost-inventory-file.yml
@@ -31,7 +31,6 @@
   file:
     path: "{{ bifrost_inventory_source }}"
     owner: "{{ ansible_env.SUDO_USER }}"
-  when: >
-    ansible_env.SUDO_USER is defined
+  when: ansible_env.SUDO_USER is defined
 
 # vim: set ts=2 sw=2 expandtab:
diff --git a/engine/provisioner/bifrost/playbooks/roles/install-configure-bifrost/tasks/download-image.yml b/engine/provisioner/bifrost/playbooks/roles/install-configure-bifrost/tasks/download-image.yml
index 0c1a932..c42f4e2 100644
--- a/engine/provisioner/bifrost/playbooks/roles/install-configure-bifrost/tasks/download-image.yml
+++ b/engine/provisioner/bifrost/playbooks/roles/install-configure-bifrost/tasks/download-image.yml
@@ -16,7 +16,8 @@
 #
 # SPDX-License-Identifier: Apache-2.0
 # ============LICENSE_END=========================================================
-- set_fact:
+- name: Set download source and destination for the deployment image
+  set_fact:
     source: "{{ item.source }}"
     destination: "{{ item.destination }}"
     download_image: "{{ item.download }}"
diff --git a/engine/provisioner/bifrost/playbooks/roles/prepare-libvirt/tasks/main.yml b/engine/provisioner/bifrost/playbooks/roles/prepare-libvirt/tasks/main.yml
index 203675d..593613b 100644
--- a/engine/provisioner/bifrost/playbooks/roles/prepare-libvirt/tasks/main.yml
+++ b/engine/provisioner/bifrost/playbooks/roles/prepare-libvirt/tasks/main.yml
@@ -61,9 +61,9 @@
 
 - name: "Place sgabios.bin"
   command: cp /usr/share/misc/sgabios.bin /usr/share/qemu/sgabios.bin
-  when: >
-    test_sgabios_qemu == false and
-    test_sgabios_misc == true
+  when:
+    - not test_sgabios_qemu
+    - test_sgabios_misc
 
 # NOTE(TheJulia): In order to prevent conflicts, stop
 # dnsmasq to prevent conflicts with libvirt restarting.
diff --git a/engine/provisioner/heat/playbooks/roles/create-stack/tasks/create-stack.yml b/engine/provisioner/heat/playbooks/roles/create-stack/tasks/create-stack.yml
index 116b90b..31ee79c 100644
--- a/engine/provisioner/heat/playbooks/roles/create-stack/tasks/create-stack.yml
+++ b/engine/provisioner/heat/playbooks/roles/create-stack/tasks/create-stack.yml
@@ -63,8 +63,11 @@
     msg: "{{ stack_create_output }}"
 
 - name: Get stack list
-  shell: openstack stack list --property name={{ stack_name }}
+  command: "openstack stack list --property name={{ stack_name }}"
+  when: stack_create_output
   register: stack_list_output
+  environment:
+    PATH: "{{ engine_venv }}/bin"
 
 - name: Log stack list output to console
   debug:
diff --git a/engine/provisioner/heat/playbooks/roles/create-stack/tasks/generate-kubespray-inventory.yml b/engine/provisioner/heat/playbooks/roles/create-stack/tasks/generate-kubespray-inventory.yml
index 72efe2f..77ca284 100644
--- a/engine/provisioner/heat/playbooks/roles/create-stack/tasks/generate-kubespray-inventory.yml
+++ b/engine/provisioner/heat/playbooks/roles/create-stack/tasks/generate-kubespray-inventory.yml
@@ -18,28 +18,34 @@
 # ============LICENSE_END=========================================================
 
 - name: Get IP of jumphost
-  shell: "openstack stack output show {{ stack_name }} jumphost_ip -c output_value -f json"
+  command: "openstack stack output show {{ stack_name }} jumphost_ip -c output_value -f json"
   register: stack_output_jumphost_ip
   changed_when: false
   until: "'output_value' in stack_output_jumphost_ip.stdout"
   retries: 10
   delay: 3
+  environment:
+    PATH: "{{ engine_venv }}/bin"
 
 - name: Get IPs of master nodes
-  shell: "openstack stack output show {{ stack_name }} master_ip -c output_value -f json"
+  command: "openstack stack output show {{ stack_name }} master_ip -c output_value -f json"
   register: stack_output_master_ip
   changed_when: false
   until: "'output_value' in stack_output_master_ip.stdout"
   retries: 10
   delay: 3
+  environment:
+    PATH: "{{ engine_venv }}/bin"
 
 - name: Get IPs of worker nodes
-  shell: "openstack stack output show {{ stack_name }} worker_ip -c output_value -f json"
+  command: "openstack stack output show {{ stack_name }} worker_ip -c output_value -f json"
   register: stack_output_worker_ip
   changed_when: false
   until: "'output_value' in stack_output_worker_ip.stdout"
   retries: 10
   delay: 3
+  environment:
+    PATH: "{{ engine_venv }}/bin"
 
 - name: Register IPs of master and worker nodes
   set_fact:
diff --git a/engine/provisioner/heat/playbooks/roles/install-configure-heat/files/heat-template.yaml b/engine/provisioner/heat/playbooks/roles/install-configure-heat/files/heat-template.yaml
index 31e1d54..906fb85 100644
--- a/engine/provisioner/heat/playbooks/roles/install-configure-heat/files/heat-template.yaml
+++ b/engine/provisioner/heat/playbooks/roles/install-configure-heat/files/heat-template.yaml
@@ -114,7 +114,7 @@
     properties:
       name:
         list_join: ['.', ['external-sg', { get_param: 'OS::stack_name' } ]]
-      description: >
+      description: |
         Security Group to place jumphost in
       rules: [
         {
@@ -131,7 +131,7 @@
     properties:
       name:
         list_join: ['.', ['internal-sg', { get_param: 'OS::stack_name' } ]]
-      description: >
+      description: |
         Security Group to place jumphost and cluster instances in
       rules: [
         {