Merge "Create docker image for Ubuntu 18.04"
[yardstick.git] / ansible / roles / install_dependencies_jumphost / tasks / Debian.yml
1 # Copyright (c) 2017 Intel Corporation.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #      http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 ---
15 - name: Update repositories
16   apt:
17     update_cache: yes
18
19 - name: Install core packages
20   action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
21   with_items:
22     - wget
23     - curl
24     - screen
25     - procps
26     - socat
27     - sshpass
28     - sudo
29     - vim
30     - libffi-dev
31     - libfuse-dev
32     - libxft-dev
33     - libxml2-dev
34     - libxss-dev
35     - libxslt1-dev
36     - libzmq3-dev
37     - qemu-user-static
38     - qemu-utils
39     - kpartx
40     - python
41     - python-setuptools
42     - python-dev
43     - python-libvirt
44     - python-virtualenv
45     - bridge-utils
46     - ebtables
47     - openssl
48     - ccze
49     - nginx-full
50     - uwsgi
51     - uwsgi-plugin-python
52     - supervisor
53     - lsof
54     - npm
55     - rabbitmq-server
56
57 - name: Install libc6:arm64 package
58   action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
59   with_items:
60     - libc6:arm64
61   when:
62     - arch is defined
63     - arch != arch_arm64
64     - installation_mode == inst_mode_container
65
66 - name: Remove dependencies that are no longer required
67   apt:
68     update_cache: yes
69
70 - name: Remove useless packages from the cache
71   apt:
72     autoclean: yes
73
74 # There is a bug with the easy install ansible module in Ubuntu 16.04 linux.
75 # Refer https://github.com/ansible/ansible/issues/23534
76 - name: Install pip
77   shell: easy_install -U pip
78   when:
79     - ansible_distribution == 'Ubuntu'
80     - ansible_distribution_major_version|int <= 16
81
82 - name: Install python-pip
83   action: "{{ ansible_pkg_mgr }} name=python-pip state=present"
84   when:
85     - ansible_distribution == 'Ubuntu'
86     - ansible_distribution_major_version|int >= 17
87
88 - name: Install required docker-py module
89   pip:
90     name: docker-py
91     state: latest
92   environment: "{{ proxy_env }}"