600fca12f09f8de9f78ef5b2d99cc87717d7f369
[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:
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
23     - name: Install dlux dependencies
24       block:
25         - name: Install dlux dependencies
26           yum:
27             name:
28               - firefox
29               - xorg-x11-server-Xvfb
30             state: present
31       become: true
32
33     - name: Install lispflowmapping dependencies
34       block:
35         - name: Install lispflowmapping dependencies
36           yum:
37             name:
38               - boost-devel
39               - libpcap-devel
40               - libxml2-devel
41               - libxslt-devel
42               - python-docker-py
43               - python-netaddr
44             state: present
45           become: true
46         - name: Install udpreplay
47           block:
48             - name: Fetch udpreplay git repo
49               git:
50                 repo: https://github.com/ska-sa/udpreplay.git
51                 dest: /tmp/udpreplay
52             - name: Run bootstrap.sh script
53               command: /tmp/udpreplay/bootstrap.sh
54               args:
55                 chdir: /tmp/udpreplay
56             - name: Run configure script
57               command: /tmp/udpreplay/configure
58               args:
59                 chdir: /tmp/udpreplay
60             - name: Run make
61               command: make
62               args:
63                 chdir: /tmp/udpreplay
64             - name: Install udpreplay to /usr/local/bin/udpreplay
65               copy:
66                 src: /tmp/udpreplay/udpreplay
67                 dest: /usr/local/bin/udpreplay
68                 mode: 0755
69                 owner: root
70                 remote_src: yes
71               become: yes
72
73   post_tasks:
74     - name: System Reseal
75       script: ../common-packer/provision/system-reseal.sh
76       become: true