blob: beabd1e56e40928d0036f72081dbeea09900d40f [file] [log] [blame]
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
- name: upgrade all packages
yum:
name: '*'
state: latest
- name: install auxiliary packages
yum: name={{item}} state=present update_cache=yes
with_items:
- "@Development tools"
- git
- sudo
- wget
- which
# dependencies for make couch, except erlang
- name: install packages required to build CouchDB
yum: name={{item}} state=present
with_items:
- autoconf
- autoconf213
- automake
- curl-devel
- libicu-devel
- libtool
- ncurses-devel
- nspr-devel
- zip
# special case since autoconf-archive on CentOS 6 is not in EPEL
- name: install autoconf-archive
yum:
name: "{{ autoconf_archive_package_name }}"
- name: download nodejs 6.x repo setup script
command: "wget https://rpm.nodesource.com/setup_6.x"
args:
chdir: /tmp
- name: setup nodejs 6.x repo
command: /bin/bash /tmp/setup_6.x
- name: install nodejs and npm
yum:
name: nodejs
state: present
# download and install shunit2
- import_tasks: shunit.yml
# required for make docs
- name: install packages required to build CouchDB docs
yum:
name: help2man
state: present
- name: install system-wide pip on CentOS >= 7
when: ansible_distribution == 'CentOS' and ansible_distribution_major_version > '6'
yum:
name: python-pip
state: present
# CentOS 6 needs a new python
- name: install Python 3.4 for CentOS 6
when: ansible_distribution == 'CentOS' and ansible_distribution_major_version == '6'
yum:
name: python34
state: present
# Symlink it to override system python
- name: Symlink /usr/bin/python3.4 to /usr/local/bin/python
when: ansible_distribution == 'CentOS' and ansible_distribution_major_version == '6'
command: ln -s /usr/bin/python3.4 /usr/local/bin/python
- name: retrieve pip installer for Python 3.4
when: ansible_distribution == 'CentOS' and ansible_distribution_major_version == '6'
command: "wget https://bootstrap.pypa.io/get-pip.py"
args:
chdir: /tmp
- name: install pip for Python 3.4
when: ansible_distribution == 'CentOS' and ansible_distribution_major_version == '6'
command: "/usr/bin/python3.4 /tmp/get-pip.py"
- name: install up to date version of various packages via pip
shell: pip install docutils==0.13.1 sphinx==1.5.3 sphinx_rtd_theme nose requests hypothesis
- name: dependencies for packages
yum: name={{item}} state=present
with_items:
- createrepo
- xfsprogs-devel
- rpmdevtools
- name: dependencies for JS packages (CentOS 6 only)
when: ansible_distribution == 'CentOS' and ansible_distribution_major_version == '6'
yum: name={{item}} state=present
with_items:
- ncurses-devel
- autoconf213
- nspr-devel
- readline-devel
- name: clean up yum cache
command: yum clean all