Matteo Scandolo | 3896c47 | 2017-08-01 13:31:42 -0700 | [diff] [blame] | 1 | |
| 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 Williams | 4e5e0cc | 2016-03-10 12:51:35 -0700 | [diff] [blame] | 17 | --- |
| 18 | # file: roles/dell-virt/prep/tasks/main.yml |
| 19 | |
| 20 | - name: Trust the Dell apt repository |
| 21 | apt_key: |
David K. Bainbridge | 77a516a | 2016-10-27 10:57:57 -0700 | [diff] [blame] | 22 | data: "{{ lookup('file', 'dell_apt_key.gpg') }}" |
Zack Williams | 4e5e0cc | 2016-03-10 12:51:35 -0700 | [diff] [blame] | 23 | |
| 24 | - name: Add Dell apt repo |
Zack Williams | a091260 | 2016-03-14 11:05:09 -0700 | [diff] [blame] | 25 | apt_repository: |
David K. Bainbridge | 77a516a | 2016-10-27 10:57:57 -0700 | [diff] [blame] | 26 | repo="{{ dell_apt_repo | default('deb http://linux.dell.com/repo/community/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} openmanage') }}" |
Zack Williams | 4e5e0cc | 2016-03-10 12:51:35 -0700 | [diff] [blame] | 27 | |
| 28 | - name: Install BIOS configuration scripts |
| 29 | apt: |
| 30 | update_cache=yes |
Zack Williams | 6c3b873 | 2016-03-15 09:57:07 -0700 | [diff] [blame] | 31 | cache_valid_time=3600 |
Zack Williams | 4e5e0cc | 2016-03-10 12:51:35 -0700 | [diff] [blame] | 32 | 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 Williams | 3562456 | 2016-08-28 17:12:26 -0700 | [diff] [blame] | 39 | tags: |
| 40 | - skip_ansible_lint # just used to register result |
Zack Williams | 4e5e0cc | 2016-03-10 12:51:35 -0700 | [diff] [blame] | 41 | |
| 42 | - name: Enable virtualization in BIOS |
| 43 | command: /opt/dell/toolkit/bin/syscfg --virtualization=enable |
| 44 | when: virtualization_enabled|failed |
| 45 | |