Chore: Update global-jjb to latest v0.90.9
[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 lispflowmapping dependencies
39       block:
40         - name: Install lispflowmapping dependencies
41           yum:
42             name:
43               - boost-devel
44               - libpcap-devel
45               - libxml2-devel
46               - libxslt-devel
47             state: present
48           become: true
49
50         - name: Install lispflowmapping dependencies for CentOS 7
51           yum:
52             name:
53               - python-docker-py
54               - python-netaddr
55             state: present
56           become: true
57           when:
58             - ansible_facts['distribution_major_version'] is version('8', '<')
59
60         - name: Install lispflowmapping dependencies for CentOS 8
61           yum:
62             name:
63               - python3-docker
64               - python3-netaddr
65             state: present
66           become: true
67           when:
68             - ansible_facts['distribution_major_version'] is version('8', '>=')
69
70         - name: Install udpreplay
71           block:
72             - name: Fetch udpreplay git repo
73               git:
74                 repo: https://github.com/ska-sa/udpreplay.git
75                 dest: /tmp/udpreplay
76             - name: Run bootstrap.sh script
77               command: /tmp/udpreplay/bootstrap.sh
78               args:
79                 chdir: /tmp/udpreplay
80             - name: Run configure script
81               command: /tmp/udpreplay/configure
82               args:
83                 chdir: /tmp/udpreplay
84             - name: Run make
85               command: make
86               args:
87                 chdir: /tmp/udpreplay
88             - name: Install udpreplay to /usr/local/bin/udpreplay
89               copy:
90                 src: /tmp/udpreplay/udpreplay
91                 dest: /usr/local/bin/udpreplay
92                 mode: 0755
93                 owner: root
94                 remote_src: true
95               become: true
96
97   post_tasks:
98     - name: System Reseal
99       script: ../common-packer/provision/system-reseal.sh
100       become: true