blob: 730e3c8fb6acaba0fe0dba0746c543c698948a43 [file] [log] [blame]
Zack Williams4e5e0cc2016-03-10 12:51:35 -07001---
2# file: roles/dell-virt/prep/tasks/main.yml
3
4- name: Trust the Dell apt repository
5 apt_key:
David K. Bainbridge77a516a2016-10-27 10:57:57 -07006 data: "{{ lookup('file', 'dell_apt_key.gpg') }}"
Zack Williams4e5e0cc2016-03-10 12:51:35 -07007
8- name: Add Dell apt repo
Zack Williamsa0912602016-03-14 11:05:09 -07009 apt_repository:
David K. Bainbridge77a516a2016-10-27 10:57:57 -070010 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 -070011
12- name: Install BIOS configuration scripts
13 apt:
14 update_cache=yes
Zack Williams6c3b8732016-03-15 09:57:07 -070015 cache_valid_time=3600
Zack Williams4e5e0cc2016-03-10 12:51:35 -070016 name=dtk-scripts
17
18# KVM virtualization is either "kvm_intel" or "kvm_amd" on amd64
19- name: Check to see if processor KVM virtualization module loaded in kernel
20 shell: lsmod | grep kvm_
21 ignore_errors: true
22 register: virtualization_enabled
Zack Williams35624562016-08-28 17:12:26 -070023 tags:
24 - skip_ansible_lint # just used to register result
Zack Williams4e5e0cc2016-03-10 12:51:35 -070025
26- name: Enable virtualization in BIOS
27 command: /opt/dell/toolkit/bin/syscfg --virtualization=enable
28 when: virtualization_enabled|failed
29