blob: c55cd81192c5a7a533266fb371cec62725639684 [file] [log] [blame]
Matteo Scandolo3896c472017-08-01 13:31:42 -07001
2# Copyright 2017-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16
Zack Williams4e5e0cc2016-03-10 12:51:35 -070017---
18# file: roles/dell-virt/prep/tasks/main.yml
19
20- name: Trust the Dell apt repository
21 apt_key:
David K. Bainbridge77a516a2016-10-27 10:57:57 -070022 data: "{{ lookup('file', 'dell_apt_key.gpg') }}"
Zack Williams4e5e0cc2016-03-10 12:51:35 -070023
24- name: Add Dell apt repo
Zack Williamsa0912602016-03-14 11:05:09 -070025 apt_repository:
David K. Bainbridge77a516a2016-10-27 10:57:57 -070026 repo="{{ dell_apt_repo | default('deb http://linux.dell.com/repo/community/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} openmanage') }}"
Zack Williams4e5e0cc2016-03-10 12:51:35 -070027
28- name: Install BIOS configuration scripts
29 apt:
30 update_cache=yes
Zack Williams6c3b8732016-03-15 09:57:07 -070031 cache_valid_time=3600
Zack Williams4e5e0cc2016-03-10 12:51:35 -070032 name=dtk-scripts
33
34# KVM virtualization is either "kvm_intel" or "kvm_amd" on amd64
35- name: Check to see if processor KVM virtualization module loaded in kernel
36 shell: lsmod | grep kvm_
37 ignore_errors: true
38 register: virtualization_enabled
Zack Williams35624562016-08-28 17:12:26 -070039 tags:
40 - skip_ansible_lint # just used to register result
Zack Williams4e5e0cc2016-03-10 12:51:35 -070041
42- name: Enable virtualization in BIOS
43 command: /opt/dell/toolkit/bin/syscfg --virtualization=enable
44 when: virtualization_enabled|failed
45