diff --git a/ansible/roles/baremetal/tasks/install.yml b/ansible/roles/baremetal/tasks/install.yml
index 0065f74104110a2517b253de57951404fb811c5a..71ea50efc00541ba73bf124ad913ef6d097f5c1c 100644
--- a/ansible/roles/baremetal/tasks/install.yml
+++ b/ansible/roles/baremetal/tasks/install.yml
@@ -7,7 +7,9 @@
 # TODO(inc0): Gates don't seem to have ufw executable, check for it instead of ignore errors
 - name: Set firewall default policy
   become: True
-  ufw: state=disabled policy=allow
+  ufw:
+    state: disabled
+    policy: allow
   when: ansible_os_family == 'Debian'
   ignore_errors: yes
 
@@ -30,40 +32,53 @@
     - firewalld_check.rc == 0
 
 - name: Install apt packages
-  package: name={{item}} state=present
+  package:
+    name: "{{ item }}"
+    state: present
   become: True
   with_items: "{{ debian_pkg_install }}"
   when: ansible_os_family == 'Debian'
 
 - name: Install deltarpm packages
-  package: name={{item}} state=installed
+  package:
+    name: "{{ item }}"
+    state: installed
   become: True
   with_items:
     - deltarpm
   when: ansible_os_family == 'RedHat'
 
 - name: Install yum packages
-  package: name={{item}} state=present
+  package:
+    name: "{{ item }}"
+    state: present
   become: True
   with_items: "{{ redhat_pkg_install }}"
   when: ansible_os_family == 'RedHat'
 
 - name: Install pip
-  easy_install: name=pip
+  easy_install:
+    name: pip
   become: True
 
 - name: Install docker SDK for python
-  pip: name=docker state=latest
+  pip:
+    name: docker
+    state: latest
   become: True
 
 - name: Remove packages
-  package: name={{item}} state=absent
+  package:
+    name: "{{ item }}"
+    state: absent
   with_items: "{{ ubuntu_pkg_removals }}"
   become: True
   when: ansible_distribution|lower == "ubuntu"
 
 - name: Remove packages
-  package: name={{item}} state=absent
+  package:
+    name: "{{ item }}"
+    state: absent
   with_items: "{{ redhat_pkg_removals }}"
   become: True
   when: ansible_os_family == 'RedHat'
diff --git a/ansible/roles/baremetal/tasks/post-install.yml b/ansible/roles/baremetal/tasks/post-install.yml
index 653e7b65f7507a76507631178f4877c81c7c1e67..9e11d782d7786019b37520156e1c1d973d49d0c4 100644
--- a/ansible/roles/baremetal/tasks/post-install.yml
+++ b/ansible/roles/baremetal/tasks/post-install.yml
@@ -1,16 +1,16 @@
 ---
 - name: Ensure docker service directory exists
   file:
-    path=/etc/systemd/system/docker.service.d
-    state=directory
-    recurse=yes
+    path: /etc/systemd/system/docker.service.d
+    state: directory
+    recurse: yes
   become: True
 
 - name: Configure docker service
   become: True
   template:
-    src=docker_systemd_service.j2
-    dest=/etc/systemd/system/docker.service.d/kolla.conf
+    src: docker_systemd_service.j2
+    dest: /etc/systemd/system/docker.service.d/kolla.conf
   register: docker_configured
 
 - name: Reload docker service file
@@ -18,7 +18,8 @@
   command: systemctl daemon-reload
 
 - name: Get stat of libvirtd apparmor profile
-  stat: path=/etc/apparmor.d/usr.sbin.libvirtd
+  stat:
+    path: /etc/apparmor.d/usr.sbin.libvirtd
   register: apparmor_libvirtd_profile
   when: ansible_distribution == "Ubuntu"
 
diff --git a/ansible/roles/baremetal/tasks/pre-install.yml b/ansible/roles/baremetal/tasks/pre-install.yml
index 3818c9b2c2f81b2bb56347cf72986c608ed42be2..1465612ce9ff4e22d0c78365134196cb02136d02 100644
--- a/ansible/roles/baremetal/tasks/pre-install.yml
+++ b/ansible/roles/baremetal/tasks/pre-install.yml
@@ -35,11 +35,15 @@
       'ansible_' + hostvars[inventory_hostname]['api_interface'] in hostvars[inventory_hostname]
 
 - name: Ensure sudo group is present
-  group: name=sudo state=present
+  group:
+    name: sudo
+    state: present
   become: True
 
 - name: Ensure kolla group is present
-  group: name=kolla state=present
+  group:
+    name: kolla
+    state: present
   become: True
   when: create_kolla_user | bool
 
@@ -74,7 +78,9 @@
   when: ansible_os_family == 'Debian'
 
 - name: Install ubuntu ca certs
-  package: name={{item}} state=latest
+  package:
+    name: "{{ item }}"
+    state: latest
   become: True
   with_items:
     - ca-certificates
@@ -83,7 +89,10 @@
     - ansible_os_family == 'Debian'
 
 - name: Ensure apt sources list directory exists
-  file: path=/etc/apt/sources.list.d state=directory recurse=yes
+  file:
+    path: /etc/apt/sources.list.d
+    state: directory
+    recurse: yes
   become: True
   when: ansible_os_family == 'Debian'
 
@@ -105,7 +114,10 @@
     - ansible_distribution == 'Ubuntu'
 
 - name: Ensure yum repos directory exists
-  file: path=/etc/yum.repos.d/ state=directory recurse=yes
+  file:
+    path: /etc/yum.repos.d/
+    state: directory
+    recurse: yes
   become: True
   when: ansible_os_family == 'RedHat'
 
diff --git a/ansible/roles/baremetal/templates/docker_apt_repo.j2 b/ansible/roles/baremetal/templates/docker_apt_repo.j2
index a317c5b56f04155bcf79756018628e2b9c22790d..16ea8fc1d7122370d62c88699c1dd3bd67a77919 100644
--- a/ansible/roles/baremetal/templates/docker_apt_repo.j2
+++ b/ansible/roles/baremetal/templates/docker_apt_repo.j2
@@ -1,2 +1,2 @@
 # main docker repo
-deb {{docker_apt_url}}/repo {{ansible_distribution|lower}}-{{ansible_distribution_release|lower}} main
+deb {{ docker_apt_url }}/repo {{ ansible_distribution | lower }}-{{ ansible_distribution_release | lower }} main
diff --git a/ansible/roles/baremetal/templates/docker_defaults.j2 b/ansible/roles/baremetal/templates/docker_defaults.j2
index 0b6b375bb580d7cfb005aa7cdb5a215e62563797..7ef258f650b80d55ea2f7f9d64d061e163c8dfb2 100644
--- a/ansible/roles/baremetal/templates/docker_defaults.j2
+++ b/ansible/roles/baremetal/templates/docker_defaults.j2
@@ -16,7 +16,7 @@ DOCKER_OPTS=""
 DOCKER_OPTS="$DOCKER_OPTS --storage-driver={{ docker_storage_driver }}"
 {% endif %}
 {% if docker_registry %}
-DOCKER_OPTS="$DOCKER_OPTS --insecure-registry  {{ docker_registry }}"
+DOCKER_OPTS="$DOCKER_OPTS --insecure-registry {{ docker_registry }}"
 {% endif %}
 
 # If you need Docker to use an HTTP proxy, it can also be specified here.
diff --git a/ansible/roles/baremetal/templates/docker_yum_repo.j2 b/ansible/roles/baremetal/templates/docker_yum_repo.j2
index a165efab209979da89343313d0d83cba6fc77997..8de5f3703c19eac233367743a5efee4bd497695f 100644
--- a/ansible/roles/baremetal/templates/docker_yum_repo.j2
+++ b/ansible/roles/baremetal/templates/docker_yum_repo.j2
@@ -1,6 +1,6 @@
 [docker-repo]
 name=Docker main Repository
-baseurl={{docker_yum_url}}/repo/main/{{ansible_distribution|lower}}/{{ansible_distribution_major_version|lower}}
+baseurl={{ docker_yum_url }}/repo/main/{{ ansible_distribution | lower }}/{{ ansible_distribution_major_version | lower }}
 enabled=1
 gpgcheck=1
-gpgkey={{docker_yum_url}}/gpg
+gpgkey={{ docker_yum_url }}/gpg