Merge "Fix Prox L2fwd generator packet"
[yardstick.git] / ansible / roles / infra_rampup_stack_nodes / tasks / install_packets.yml
1 # Copyright (c) 2018 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 apt cache
16   apt:
17     update_cache: yes
18     upgrade: yes
19     cache_valid_time: 36000
20   environment: "{{ proxy_env }}"
21
22 - name: Install packets
23   apt:
24     name: "{{ item }}"
25   with_items:
26     - python-tox
27     - python-dev
28     - libffi-dev
29     - libssl-dev
30     - python3-dev
31     - ethtool
32     - ipmitool
33     - git
34     - ntp
35     - apparmor-utils
36     - docker.io
37     - libvirt-bin
38     - python-setuptools
39     - build-essential
40   environment: "{{ proxy_env }}"
41
42 - name: Install pip
43   shell: easy_install pip
44   environment: "{{ proxy_env }}"
45
46 - name: Update pip ansible docker
47   pip:
48     name: "{{ item }}"
49     state: latest
50   with_items:
51     - ansible
52     - docker
53     - tox
54     - shade
55   environment: "{{ proxy_env }}"
56
57 - name: Remove conflicting packages
58   apt:
59     name: "{{ item }}"
60     state: absent
61   with_items:
62     - lxd
63     - lxc
64
65 - name: Stop and disable libvirt
66   systemd:
67     state: stopped
68     enabled: no
69     name: libvirt-bin.service
70
71 - name: Stop and disable apparmor service
72   systemd:
73     name: apparmor
74     state: stopped
75     enabled: no
76
77 - name: Get stat of libvirtd apparmor profile
78   stat:
79     path: /etc/apparmor.d/disable/usr.sbin.libvirtd
80   register: apparmor_libvirtd_profile
81
82 - name: Remove apparmor profile for libvirt
83   shell: ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/ && apparmor_parser -R /etc/apparmor.d/usr.sbin.libvirtd
84   when:
85     - apparmor_libvirtd_profile.stat.exists == False