LTS: Performance testing
[csit.git] / resources / tools / testbed-setup / ansible / roles / vpp_device / tasks / main.yaml
1 ---
2 # file: roles/vpp_device/tasks/main.yaml
3
4 - name: VPP_device - Load Kernel Modules By Default
5   lineinfile:
6     path: "/etc/modules"
7     state: "present"
8     line: "{{ item }}"
9   with_items:
10     - "vfio-pci"
11   tags:
12     - load-kernel-modules
13
14 - name: VPP_device - Copy csit-initialize-vfs.sh
15   copy:
16    src: "files/csit-initialize-vfs.sh"
17    dest: "/usr/local/bin/"
18    owner: "root"
19    group: "root"
20    mode: "744"
21   tags:
22     - copy-vf-script
23
24 - name: VPP_device - Copy csit-initialize-vfs-data.sh
25   copy:
26    src: "files/{{ vfs_data_file }}"
27    dest: "/usr/local/bin/csit-initialize-vfs-data.sh"
28    owner: "root"
29    group: "root"
30    mode: "744"
31   tags: copy-vf-data-script
32   when:
33     - vfs_data_file is defined
34
35 - name: VPP_device - Copy default csit-initialize-vfs-data.sh
36   copy:
37    src: "files/csit-initialize-vfs-default.sh"
38    dest: "/usr/local/bin/csit-initialize-vfs-data.sh"
39    owner: "root"
40    group: "root"
41    mode: "744"
42   tags: copy-vf-data-script
43   when:
44     - vfs_data_file is not defined
45
46 - name: VPP_device - Start csit-initialize-vfs.service
47   copy:
48    src: "files/csit-initialize-vfs.service"
49    dest: "/etc/systemd/system/"
50    owner: "root"
51    group: "root"
52    mode: "644"
53   notify:
54     - "Start csit-initialize-vfs.service"
55   tags:
56     - start-vf-service
57
58 - meta: flush_handlers
59
60 - name: VPP_device - Set hugepages in GRUB
61   lineinfile:
62     path: "/etc/default/grub"
63     state: "present"
64     regexp: "^GRUB_CMDLINE_LINUX="
65     line: 'GRUB_CMDLINE_LINUX="hugepagesz=2M hugepages={{ grub.nr_hugepages }}"'
66   notify:
67     - "Update GRUB"
68     - "Reboot server"
69   tags:
70     - set-grub
71
72 - meta: flush_handlers