Ansible: Cascadelake include
[csit.git] / resources / tools / testbed-setup / ansible / roles / tg_sut / tasks / main.yaml
1 ---
2 # file: roles/tg_sut/tasks/main.yaml
3
4 - name: Install distribution - release - machine prerequisites
5   include_tasks: '{{ ansible_distribution|lower }}_{{ ansible_distribution_release }}.yaml'
6   tags: [ install-csit-dependencies, install-docker, install-kubernetes ]
7
8 - name: Machine specifics
9   include_tasks: '{{ ansible_machine }}.yaml'
10   tags: [ disable-turbo-boost, set-grub, install-pip ]
11
12 - name: Turbo boost specific
13   import_tasks: turbo_boost.yaml
14   when: cpu_microarchitecture == "skylake" or cpu_microarchitecture == "cascadelake"
15   tags: [ install-msr, disable-turbo-boost ]
16
17 - name: Copy netplan network config file
18   template:
19     src: 'files/netplan_config'
20     dest: '/etc/netplan/01-netcfg.yaml'
21     owner: 'root'
22     group: 'root'
23     mode: '0644'
24   tags: copy-interface-file
25
26 - name: Copy CSIT sysctl file
27   template:
28     src: 'files/90-csit'
29     dest: '/etc/sysctl.d/90-csit.conf'
30     owner: 'root'
31     group: 'root'
32     mode: '0644'
33   tags: copy-90-csit
34
35 - name: Copy IRQ load balancing file
36   copy:
37     src: 'files/irqbalance'
38     dest: '/etc/default/irqbalance'
39     owner: 'root'
40     group: 'root'
41     mode: '0644'
42   tags: copy-irq
43
44 - name: Copy cpufrequtils file
45   copy:
46     src: 'files/cpufrequtils'
47     dest: '/etc/default/cpufrequtils'
48     owner: 'root'
49     group: 'root'
50     mode: '0644'
51   tags: copy-cpufrequtils
52
53 - name: Set ondemand service to disable
54   service:
55     name: 'ondemand'
56     enabled: 'no'
57   tags: set-ondemand
58
59 - name: Install VPP PIP requirements
60   pip:
61     name:
62       - 'aenum==2.1.2'
63   tags: install-pip
64
65 - name: Load vfio-pci by default
66   lineinfile:
67     path: '/etc/modules'
68     state: 'present'
69     line: 'vfio-pci'
70   tags: load-vfio-pci