From 143f1c2d9a9bca7b4de4fc0309d73c9c8c8ebd21 Mon Sep 17 00:00:00 2001
From: Duong Ha-Quang <duonghq@vn.fujitsu.com>
Date: Tue, 30 Aug 2016 17:09:59 +0700
Subject: [PATCH] Add ansible raw task note, add apt-get update

Add note about raw install
Add apt-get update before install python

TrivialFix
Closes-Bug: #1618297

Change-Id: I08372dcfe71dff8c0a50a421788309b642e2a521
---
 ansible/roles/baremetal/tasks/pre-install.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ansible/roles/baremetal/tasks/pre-install.yml b/ansible/roles/baremetal/tasks/pre-install.yml
index 9aa13c2564..05b5f2b6de 100644
--- a/ansible/roles/baremetal/tasks/pre-install.yml
+++ b/ansible/roles/baremetal/tasks/pre-install.yml
@@ -1,8 +1,8 @@
 ---
-
+# NOTE: raw install is required to support cloud images which do not have python installed
 - name: "install python2 and python-simplejson"
   become: true
-  raw: "yum install -y python python-simplejson || apt-get install -y python2.7 python-simplejson"
+  raw: "yum install -y python python-simplejson || (apt-get update && apt-get install -y python2.7 python-simplejson)"
 
 - name: gather facts
   setup: