This patch fixes BUILD, which broke because of Ansible's deprecation of
version 2.2. We now install Ansible using pip instead of apt.
Change-Id: Icb18bea001e31e7b291e5cbaebe580f550eca2f2
diff --git a/roles/head-prep/tasks/main.yml b/roles/head-prep/tasks/main.yml
index c779d8b..d934c2d 100644
--- a/roles/head-prep/tasks/main.yml
+++ b/roles/head-prep/tasks/main.yml
@@ -14,7 +14,7 @@
repo={{ item }}
with_items:
- "{{ juju_apt_repo | default('ppa:juju/stable') }}"
- - "{{ ansible_apt_repo | default('ppa:ansible/ansible') }}"
+ # - "{{ ansible_apt_repo | default('ppa:ansible/ansible') }}"
register: result
until: result | success
retries: 3
@@ -37,15 +37,20 @@
- python-glanceclient
- python-lxml
- virt-top
+ - libssl-dev
+ - python-dev
+ - sshpass
-- name: Make sure Ansible is newest version
- apt:
- name: "ansible"
- state: latest
- update_cache: yes
- cache_valid_time: 3600
- tags:
- - skip_ansible_lint # ansible-lint complains about latest, need this or old built in 1.5.x version may be used if already installed.
+- name: Install Ansible via pip
+ pip: name=ansible version=2.2.2.0
+# - name: Make sure Ansible is newest version
+# apt:
+# name: "ansible"
+# state: latest
+# update_cache: yes
+# cache_valid_time: 3600
+# tags:
+# - skip_ansible_lint # ansible-lint complains about latest, need this or old built in 1.5.x version may be used if already installed.
- name: Install Python packages
pip:
diff --git a/scripts/cord-bootstrap.sh b/scripts/cord-bootstrap.sh
index 1ecc732..f8c5359 100644
--- a/scripts/cord-bootstrap.sh
+++ b/scripts/cord-bootstrap.sh
@@ -12,9 +12,11 @@
if [ ! -x "/usr/bin/ansible" ]
then
echo "Installing Ansible..."
- sudo apt-get update
- sudo apt-get install -y software-properties-common
- sudo apt-add-repository -y ppa:ansible/ansible
+# sudo apt-get update
+# sudo apt-get install -y software-properties-common
+# sudo apt-add-repository -y ppa:ansible/ansible
+ sudo apt-get -y install python-dev libffi-dev python-pip libssl-dev sshpass
+ pip install ansible==2.2.2.0
sudo apt-get update
sudo apt-get install -y ansible python-netaddr
fi