# Copyright (c) 2018 Intel Corporation. # # Licensed 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: Update apt cache apt: update_cache: yes upgrade: yes cache_valid_time: 36000 environment: "{{ proxy_env }}" - name: Install packets apt: name: "{{ item }}" with_items: - python-tox - python-dev - libffi-dev - libssl-dev - python3-dev - ethtool - ipmitool - git - ntp - apparmor-utils - docker.io - libvirt-bin - python-setuptools - build-essential environment: "{{ proxy_env }}" - name: Install pip shell: easy_install pip environment: "{{ proxy_env }}" - name: Update pip ansible docker pip: name: "{{ item }}" state: latest with_items: - ansible - docker - tox - shade environment: "{{ proxy_env }}" - name: Remove conflicting packages apt: name: "{{ item }}" state: absent with_items: - lxd - lxc - name: Stop and disable libvirt systemd: state: stopped enabled: no name: libvirt-bin.service - name: Stop and disable apparmor service systemd: name: apparmor state: stopped enabled: no - name: Get stat of libvirtd apparmor profile stat: path: /etc/apparmor.d/disable/usr.sbin.libvirtd register: apparmor_libvirtd_profile - name: Remove apparmor profile for libvirt shell: ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/ && apparmor_parser -R /etc/apparmor.d/usr.sbin.libvirtd when: - apparmor_libvirtd_profile.stat.exists == False