Chore: Clean up mininet-ovs-2.5
[releng/builder.git] / packer / provision / robot.yaml
1 ---
2 - import_playbook: ../common-packer/provision/baseline.yaml
3
4 - hosts: all
5   become_user: root
6   become_method: sudo
7
8   pre_tasks:
9     - include_role: name=lfit.system-update
10
11   tasks:
12     - name: Install robot dependencies on CentOS 7
13       yum:
14         name:
15           - postgresql-devel
16           - python-docker-py
17           - python-matplotlib
18           - python-netaddr
19           - python36-pip
20         state: present
21       become: true
22       when:
23         - ansible_facts['distribution_major_version'] is version('8', '<')
24
25     - name: Install robot dependencies on CentOS 8
26       yum:
27         name:
28           - postgresql-devel
29           - python3-docker
30           - python3-matplotlib
31           - python3-netaddr
32           - python38-pip
33         state: present
34       become: true
35       when:
36         - ansible_facts['distribution_major_version'] is version('8', '>=')
37
38     - name: Install dlux dependencies
39       block:
40         - name: Install dlux dependencies
41           yum:
42             name:
43               - firefox
44               - xorg-x11-server-Xvfb
45             state: present
46       become: true
47
48     - name: Install lispflowmapping dependencies
49       block:
50         - name: Install lispflowmapping dependencies
51           yum:
52             name:
53               - boost-devel
54               - libpcap-devel
55               - libxml2-devel
56               - libxslt-devel
57             state: present
58           become: true
59
60         - name: Install lispflowmapping dependencies for CentOS 7
61           yum:
62             name:
63               - python-docker-py
64               - python-netaddr
65             state: present
66           become: true
67           when:
68             - ansible_facts['distribution_major_version'] is version('8', '<')
69
70         - name: Install lispflowmapping dependencies for CentOS 8
71           yum:
72             name:
73               - python3-docker
74               - python3-netaddr
75             state: present
76           become: true
77           when:
78             - ansible_facts['distribution_major_version'] is version('8', '>=')
79
80         - name: Install udpreplay
81           block:
82             - name: Fetch udpreplay git repo
83               git:
84                 repo: https://github.com/ska-sa/udpreplay.git
85                 dest: /tmp/udpreplay
86             - name: Run bootstrap.sh script
87               command: /tmp/udpreplay/bootstrap.sh
88               args:
89                 chdir: /tmp/udpreplay
90             - name: Run configure script
91               command: /tmp/udpreplay/configure
92               args:
93                 chdir: /tmp/udpreplay
94             - name: Run make
95               command: make
96               args:
97                 chdir: /tmp/udpreplay
98             - name: Install udpreplay to /usr/local/bin/udpreplay
99               copy:
100                 src: /tmp/udpreplay/udpreplay
101                 dest: /usr/local/bin/udpreplay
102                 mode: 0755
103                 owner: root
104                 remote_src: true
105               become: true
106
107   post_tasks:
108     - name: System Reseal
109       script: ../common-packer/provision/system-reseal.sh
110       become: true