Sync up 'install.yaml' with 'nsb_setup.yml'
[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 dependency for Ubuntu 18
20   action: "{{ ansible_pkg_mgr }} name=libssl1.0-dev state=present"
21   when:
22     - ansible_distribution == 'Ubuntu'
23     - ansible_distribution_major_version|int >= 17
24
25 - name: Install core packages
26   action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
27   with_items:
28     - wget
29     - curl
30     - screen
31     - procps
32     - socat
33     - sshpass
34     - sudo
35     - vim
36     - libffi-dev
37     - libfuse-dev
38     - libxft-dev
39     - libxml2-dev
40     - libxss-dev
41     - libxslt1-dev
42     - libzmq3-dev
43     - qemu-user-static
44     - qemu-utils
45     - kpartx
46     - python
47     - python-setuptools
48     - python-dev
49     - python-libvirt
50     - python-virtualenv
51     - bridge-utils
52     - ebtables
53     - openssl
54     - ccze
55     - nginx-full
56     - uwsgi
57     - uwsgi-plugin-python
58     - supervisor
59     - lsof
60     - npm
61     - rabbitmq-server
62
63 - name: Install libc6:arm64 package
64   action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
65   with_items:
66     - libc6:arm64
67   when:
68     - arch is defined
69     - arch != arch_arm64
70     - installation_mode == inst_mode_container
71
72 - name: Remove dependencies that are no longer required
73   apt:
74     update_cache: yes
75
76 - name: Remove useless packages from the cache
77   apt:
78     autoclean: yes
79
80 # There is a bug with the easy install ansible module in Ubuntu 16.04 linux.
81 # Refer https://github.com/ansible/ansible/issues/23534
82 - name: Install pip
83   shell: easy_install -U pip
84   when:
85     - ansible_distribution == 'Ubuntu'
86     - ansible_distribution_major_version|int <= 16
87
88 - name: Install python-pip
89   action: "{{ ansible_pkg_mgr }} name=python-pip state=present"
90   when:
91     - ansible_distribution == 'Ubuntu'
92     - ansible_distribution_major_version|int >= 17
93
94 - name: Uninstall docker as it conflicts with docker-py
95   pip:
96     name:
97       - docker
98     state: absent
99
100 - name: Install required docker-py module
101   pip:
102     name:
103       - docker-py
104       - shade
105     state: latest
106   environment: "{{ proxy_env }}"