f1fb43827a73b0fa7ec3e6545edf1bbea90a0b2c
[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     - libssl-dev
33     - libxft-dev
34     - libxml2-dev
35     - libxss-dev
36     - libxslt1-dev
37     - libzmq3-dev
38     - qemu-user-static
39     - qemu-utils
40     - kpartx
41     - python
42     - python-setuptools
43     - python-dev
44     - python-libvirt
45     - python-virtualenv
46     - bridge-utils
47     - ebtables
48     - openssl
49     - ccze
50     - nginx-full
51     - uwsgi
52     - uwsgi-plugin-python
53     - supervisor
54     - lsof
55     - nodejs
56     - npm
57     - rabbitmq-server
58
59 - name: Install libc6:arm64 package
60   action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
61   with_items:
62     - libc6:arm64
63   when:
64     - arch is defined
65     - arch != arch_arm64
66     - installation_mode == inst_mode_container
67
68 - name: Remove dependencies that are no longer required
69   apt:
70     update_cache: yes
71
72 - name: Remove useless packages from the cache
73   apt:
74     autoclean: yes
75
76 # There is a bug with the easy install ansible module in Ubuntu 16.04 linux.
77 # Refer https://github.com/ansible/ansible/issues/23534
78 - name: Install pip
79   shell: easy_install -U pip
80   when:
81     - ansible_distribution == 'Ubuntu'
82     - ansible_distribution_major_version|int <= 16
83
84 - name: Install python-pip
85   action: "{{ ansible_pkg_mgr }} name=python-pip state=present"
86   when:
87     - ansible_distribution == 'Ubuntu'
88     - ansible_distribution_major_version|int >= 17
89
90 - name: Install required docker-py module
91   pip:
92     name: docker-py
93     state: latest
94   environment: "{{ proxy_env }}"