1
0
Fork 0

server-0 setup

This commit is contained in:
Massaki Archambault 2021-12-12 23:48:57 -05:00
parent 30396e0441
commit 0b3c77d0b3
4 changed files with 34 additions and 4 deletions

4
hosts
View File

@ -33,8 +33,8 @@ all:
ansible_host: 192.168.10.10
server-0:
ansible_host: 192.168.10.11
# vars:
# ansible_user: root
vfio_pci_ids:
- '1000:0086' # Broadcom / LSI SAS2308 PCI-Express Fusion-MPT SAS-2
lb:
hosts:
lb:

View File

@ -1,2 +1,5 @@
- name: update grub
command: update-grub
- name: update initramfs
command: update-initramfs -u -k all

View File

@ -2,9 +2,26 @@
lineinfile:
path: /etc/default/grub
regexp: '^GRUB_CMDLINE_LINUX_DEFAULT='
line: 'GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on"'
line: GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on"
notify: update grub
- name: Enable vfio kernel modules
blockinfile:
path: /etc/modules
block: |
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd
notify: update initramfs
- name: Configure vfio-pci
template:
src: vfio.conf
dest: /etc/modprobe.d/vfio.conf
when: vfio_pci_ids is defined
notify: update initramfs
- name: Enable PAM users
lineinfile:
path: /etc/pve/user.cfg
@ -14,9 +31,16 @@
- name: Enable PAM users admin access
lineinfile:
path: /etc/pve/user.cfg
line: 'acl:1:/:{{ item.key }}@pam:PVEAdmin:'
line: 'acl:1:/:{{ item.key }}@pam:Administrator:'
with_dict: '{{ users }}'
# - name: Force quorum to always be reached
# lineinfile:
# path: /etc/pve/corosync.conf
# regexp: 'quorum_votes'
# line: ' quorum_votes: 2'
# with_dict: '{{ users }}'
- name: Copy pve-no-subscription.list
copy:
src: pve-no-subscription.list

View File

@ -0,0 +1,3 @@
options vfio-pci ids={{ ','.join(vfio_pci_ids) }}
# options vfio_iommu_type1 allow_unsafe_interrupts=1
blacklist mpt3sas