Merge "Add rocky job for master[sodium]"
[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
13       yum: 'name={{item}} state=present'
14       with_items:
15         - postgresql-devel
16         - python-docker-py
17         - python-matplotlib
18         - python-netaddr
19         - python36-pip
20       become: true
21
22     - name: Install dlux dependencies
23       block:
24         - name: Install dlux dependencies
25           yum: 'name={{item}} state=present'
26           with_items:
27             - firefox
28             - xorg-x11-server-Xvfb
29       become: true
30
31     - name: Install lispflowmapping dependencies
32       block:
33         - name: Install lispflowmapping dependencies
34           yum: 'name={{item}} state=present'
35           with_items:
36             - boost-devel
37             - libpcap-devel
38             - libxml2-devel
39             - libxslt-devel
40             - python-docker-py
41             - python-netaddr
42           become: true
43         - name: Install udpreplay
44           block:
45             - name: Fetch udpreplay git repo
46               git:
47                 repo: https://github.com/ska-sa/udpreplay.git
48                 dest: /tmp/udpreplay
49             - name: Run bootstrap.sh script
50               command: /tmp/udpreplay/bootstrap.sh
51               args:
52                 chdir: /tmp/udpreplay
53             - name: Run configure script
54               command: /tmp/udpreplay/configure
55               args:
56                 chdir: /tmp/udpreplay
57             - name: Run make
58               command: make
59               args:
60                 chdir: /tmp/udpreplay
61             - name: Install udpreplay to /usr/local/bin/udpreplay
62               copy:
63                 src: /tmp/udpreplay/udpreplay
64                 dest: /usr/local/bin/udpreplay
65                 mode: 0755
66                 owner: root
67                 remote_src: yes
68               become: yes
69
70   post_tasks:
71     - name: System Reseal
72       script: ../common-packer/provision/system-reseal.sh
73       become: true