Ansible requires sudo to be available and Docker images do not
typically come with sudo pre-installed so add code to ensure it
get's pulled in.
Issue: RELENG-1052
Change-Id: I8e67f7048f2199f208c7596cb7b7c6182e61ed51
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
fi
type python || type python3
+
+# Ansible requires sudo so ensure it is available.
+if ! command -v sudo; then
+ if command -v apt-get; then
+ apt-get install -y sudo
+ elif command -v yum; then
+ yum install -y sudo
+ fi
+fi
type sudo