----\r
-# file: roles/tg_sut/tasks/main.yaml\r
-\r
-- name: Ubuntu specific\r
- import_tasks: ubuntu_x86_64.yaml\r
- when: ansible_distribution|lower == 'ubuntu' and ansible_machine == 'x86_64'\r
-\r
-- name: Copy interfaces file\r
- template:\r
- src: 'files/interfaces_physical'\r
- dest: '/etc/network/interfaces'\r
- owner: 'root'\r
- group: 'root'\r
- mode: '0644'\r
- tags: copy-interface-file\r
-\r
-- name: Copy sysctl file\r
- template:\r
- src: 'files/90-csit'\r
- dest: '/etc/sysctl.d/90-csit.conf'\r
- owner: 'root'\r
- group: 'root'\r
- mode: '0644'\r
- tags: copy-90-csit\r
-\r
-- name: Copy IRQ load balancing file\r
- copy:\r
- src: 'files/irqbalance'\r
- dest: '/etc/default/irqbalance'\r
- owner: 'root'\r
- group: 'root'\r
- mode: '0644'\r
- tags: copy-irq\r
-\r
-- name: Copy cpufrequtils file\r
- copy:\r
- src: 'files/cpufrequtils'\r
- dest: '/etc/default/cpufrequtils'\r
- owner: 'root'\r
- group: 'root'\r
- mode: '0644'\r
- tags: copy-cpufrequtils\r
-\r
-- name: Copy Python requirements file\r
- copy:\r
- src: 'files/requirements.txt'\r
- dest: '/tmp/requirements.txt'\r
- tags: copy-pip\r
-\r
-- name: Set isolcpus and pstate parameter\r
- lineinfile:\r
- path: '/etc/default/grub'\r
- state: 'present'\r
- regexp: '^GRUB_CMDLINE_LINUX='\r
- line: 'GRUB_CMDLINE_LINUX="isolcpus={{ isolcpus }} nohz_full={{ isolcpus }} rcu_nocbs={{ isolcpus }} numa_balancing=disable intel_pstate=disable intel_iommu=on iommu=pt nmi_watchdog=0 audit=0 nosoftlockup processor.max_cstate=1 intel_idle.max_cstate=1 hpet=disable tsc=reliable mce=off"'\r
- notify: ['Update GRUB']\r
- tags: set-grub\r
-\r
-- name: Set ondemand service to disable\r
- service:\r
- name: 'ondemand'\r
- enabled: 'no'\r
- tags: set-ondemand\r
-\r
-- name: Install PIP requirements\r
- pip:\r
- requirements: '/tmp/requirements.txt'\r
- tags: install-pip\r
-\r
-- name: Load vfio-pci by default\r
- lineinfile:\r
- path: '/etc/modules'\r
- state: 'present'\r
- line: 'vfio-pci'\r
- tags: load-vfio-pci\r
-\r
-- name: Load msr by default\r
- lineinfile:\r
- path: '/etc/modules'\r
- state: 'present'\r
- line: 'msr'\r
- tags: disable-turbo-boost\r
-\r
-- name: Disable Turbo-Boost by service\r
- copy:\r
- src: 'files/disable-turbo-boost.service'\r
- dest: '/etc/systemd/system/disable-turbo-boost.service'\r
- owner: 'root'\r
- group: 'root'\r
- mode: '0644'\r
- when: >\r
- inventory_hostname in groups['skylake']\r
- tags: disable-turbo-boost\r
-\r
-- name: Disable Turbo-Boost by service on startup\r
- service:\r
- name: disable-turbo-boost\r
- enabled: yes\r
- when: >\r
- inventory_hostname in groups['skylake']\r
- tags: disable-turbo-boost\r
+---
+# file: roles/tg_sut/tasks/main.yaml
+
+- name: Ubuntu specific
+ import_tasks: ubuntu_x86_64.yaml
+ when: ansible_distribution|lower == 'ubuntu' and ansible_machine == 'x86_64'
+
+- name: Copy interfaces file
+ template:
+ src: 'files/interfaces_physical'
+ dest: '/etc/network/interfaces'
+ owner: 'root'
+ group: 'root'
+ mode: '0644'
+ tags: copy-interface-file
+
+- name: Copy sysctl file
+ template:
+ src: 'files/90-csit'
+ dest: '/etc/sysctl.d/90-csit.conf'
+ owner: 'root'
+ group: 'root'
+ mode: '0644'
+ tags: copy-90-csit
+
+- name: Copy IRQ load balancing file
+ copy:
+ src: 'files/irqbalance'
+ dest: '/etc/default/irqbalance'
+ owner: 'root'
+ group: 'root'
+ mode: '0644'
+ tags: copy-irq
+
+- name: Copy cpufrequtils file
+ copy:
+ src: 'files/cpufrequtils'
+ dest: '/etc/default/cpufrequtils'
+ owner: 'root'
+ group: 'root'
+ mode: '0644'
+ tags: copy-cpufrequtils
+
+- name: Copy Python requirements file
+ copy:
+ src: 'files/requirements.txt'
+ dest: '/tmp/requirements.txt'
+ tags: copy-pip
+
+- name: Set isolcpus and pstate parameter
+ lineinfile:
+ path: '/etc/default/grub'
+ state: 'present'
+ regexp: '^GRUB_CMDLINE_LINUX='
+ line: 'GRUB_CMDLINE_LINUX="isolcpus={{ isolcpus }} nohz_full={{ isolcpus }} rcu_nocbs={{ isolcpus }} numa_balancing=disable intel_pstate=disable intel_iommu=on iommu=pt nmi_watchdog=0 audit=0 nosoftlockup processor.max_cstate=1 intel_idle.max_cstate=1 hpet=disable tsc=reliable mce=off"'
+ notify: ['Update GRUB']
+ tags: set-grub
+
+- name: Set ondemand service to disable
+ service:
+ name: 'ondemand'
+ enabled: 'no'
+ tags: set-ondemand
+
+- name: Install PIP requirements
+ pip:
+ requirements: '/tmp/requirements.txt'
+ tags: install-pip
+
+- name: Load vfio-pci by default
+ lineinfile:
+ path: '/etc/modules'
+ state: 'present'
+ line: 'vfio-pci'
+ tags: load-vfio-pci
+
+- name: Load msr by default
+ lineinfile:
+ path: '/etc/modules'
+ state: 'present'
+ line: 'msr'
+ tags: disable-turbo-boost
+
+- name: Disable Turbo-Boost by service
+ copy:
+ src: 'files/disable-turbo-boost.service'
+ dest: '/etc/systemd/system/disable-turbo-boost.service'
+ owner: 'root'
+ group: 'root'
+ mode: '0644'
+ when: >
+ inventory_hostname in groups['skylake']
+ tags: disable-turbo-boost
+
+- name: Disable Turbo-Boost by service on startup
+ service:
+ name: disable-turbo-boost
+ enabled: yes
+ when: >
+ inventory_hostname in groups['skylake']
+ tags: disable-turbo-boost