summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/common
diff options
context:
space:
mode:
authorshuai chen <chenshuai@huawei.com>2016-02-26 00:56:23 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-02-26 00:56:23 +0000
commit13844327bc53f672389f7372e5ee0660d79fd761 (patch)
treea84a3ff0f0e810aa1132dd4b575a8f1b929855b0 /deploy/adapters/ansible/roles/common
parent553eb40cc40c0a5c1727bc8237932426ea790154 (diff)
parentcf09c45a4a47fdf1fa86dff4af45a64ba10597d5 (diff)
Merge "Fix: CEPH issues on centos7"
Diffstat (limited to 'deploy/adapters/ansible/roles/common')
-rw-r--r--deploy/adapters/ansible/roles/common/tasks/main.yml10
-rw-r--r--deploy/adapters/ansible/roles/common/vars/RedHat.yml2
2 files changed, 12 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/roles/common/tasks/main.yml b/deploy/adapters/ansible/roles/common/tasks/main.yml
index d195703a..f004e98d 100644
--- a/deploy/adapters/ansible/roles/common/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/common/tasks/main.yml
@@ -29,6 +29,16 @@
echo "# compass" >> /etc/hosts
echo {{ COMPASS_SERVER.stdout_lines[0] }} {{ name.stdout_lines[0] }} >> /etc/hosts
+- name: install python-crypto
+ yum: name=python-crypto state=present
+ register: python_crypto_result
+ ignore_errors: yes
+ when: ansible_os_family == "RedHat"
+
+- name: remove python crypt egg file to work-around https://bugs.centos.org/view.php?id=9896&nbn=2
+ shell: rm -rf /usr/lib64/python2.7/site-packages/pycrypto-2.6.1-py2.7.egg-info
+ when: ansible_os_family == "RedHat" and python_crypto_result.msg == "Error unpacking rpm package python2-crypto-2.6.1-9.el7.x86_64\n"
+
- name: install packages
action: "{{ ansible_pkg_mgr }} name={{ item }} state=latest update_cache=yes"
with_items: packages | union(packages_noarch)
diff --git a/deploy/adapters/ansible/roles/common/vars/RedHat.yml b/deploy/adapters/ansible/roles/common/vars/RedHat.yml
index 50102c58..8143e1cb 100644
--- a/deploy/adapters/ansible/roles/common/vars/RedHat.yml
+++ b/deploy/adapters/ansible/roles/common/vars/RedHat.yml
@@ -12,6 +12,8 @@ packages:
- python-devel
- python-memcached
- gcc
+ - redhat-lsb-core
+ - python-crypto
pip_packages:
- crudini