CSIT-1477: add 1n_tx2 VPP Device
[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: Load vfio-pci by default
5   lineinfile:
6     path: '/etc/modules'
7     state: 'present'
8     line: 'vfio-pci'
9   tags: load-vfio-pci
10
11 - name: Copy csit-initialize-vfs.sh
12   copy:
13    src: 'files/csit-initialize-vfs.sh'
14    dest: '/usr/local/bin/'
15    owner: 'root'
16    group: 'root'
17    mode: '744'
18   tags: copy-vf-script
19
20 - name: Copy csit-initialize-vfs-data.sh
21   copy:
22    src: 'files/{{ vfs_data_file }}'
23    dest: '/usr/local/bin/csit-initialize-vfs-data.sh'
24    owner: 'root'
25    group: 'root'
26    mode: '744'
27   tags: copy-vf-data-script
28   when: vfs_data_file is defined
29
30 - name: Copy default csit-initialize-vfs-data.sh
31   copy:
32    src: 'files/csit-initialize-vfs-default.sh'
33    dest: '/usr/local/bin/csit-initialize-vfs-data.sh'
34    owner: 'root'
35    group: 'root'
36    mode: '744'
37   tags: copy-vf-data-script
38   when: vfs_data_file is not defined
39
40 - name: Start csit-initialize-vfs.service
41   copy:
42    src: 'files/csit-initialize-vfs.service'
43    dest: '/etc/systemd/system/'
44    owner: 'root'
45    group: 'root'
46    mode: '644'
47   notify:
48     - 'Start csit-initialize-vfs.service'
49   tags: start-vf-service
50
51 - meta: flush_handlers
52
53 - name: Set hugepages in GRUB
54   lineinfile:
55     path: '/etc/default/grub'
56     state: 'present'
57     regexp: '^GRUB_CMDLINE_LINUX='
58     line: 'GRUB_CMDLINE_LINUX="hugepagesz=2M hugepages={{ grub.nr_hugepages }}"'
59   notify:
60     - 'Update GRUB'
61     - 'Reboot server'
62   tags: set-grub
63
64 - meta: flush_handlers
65
66 - name: Kernel VM install
67   include_tasks: '../../common/tasks/kernel_install.yaml'
68   tags: install-kernel-image

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.