Fix Packer libvirt, missing selinux bindings 05/67205/1
authorDaniel Farrell <dfarrell@redhat.com>
Tue, 16 Jan 2018 13:19:15 +0000 (08:19 -0500)
committerDaniel Farrell <dfarrell@redhat.com>
Tue, 16 Jan 2018 13:19:15 +0000 (08:19 -0500)
Builds were failing at Ansible provisioning step with error about trying
to use selinux without the Python bindings.

Change-Id: Id24eaa6d32339d0d5c94126bf01d32bf19e72ee3
Fixes: INTPAK-129
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
packer/provision/config_ansible_fedora.sh

index c8c5ab4ae341486cbed9bd8ae3bf646cb8280705..6d0f92e480a861a8c28224ebe6ff3b39d95c86f0 100644 (file)
@@ -7,7 +7,8 @@ set -x
 
 # Install Ansible, required for Packer's ansible-local provisioner
 # Git is required by the ansible-galaxy tool when installing roles
-sudo dnf install -y ansible git python-dnf
+# Ansible will fail if selinux is enabled but bindings not installed
+sudo dnf install -y ansible git python-dnf libselinux-python
 
 # Install the latest release of ODL's Ansible role from Ansible Galaxy
 # The `ansible-galaxy` tool was installed by Ansible's RPM