2 - name: Install lava-server
7 - name: Enable apache modules
9 cmd: a2enmod "{{ item }}"
10 creates: "/etc/apache2/mods-enabled/{{item}}.load"
17 - name: Disable default apache2 site
19 path: /etc/apache2/sites-enable/000-default.conf
23 - name: Enable lava-server site
25 cmd: a2ensite lava-server.conf
26 creates: /etc/apache2/sites-enabled/lava-server.conf
29 - name: Deploy internal certificate
35 - name: Create TLS vhost
38 dest: /etc/apache2/sites-enabled/lava-server-tls.conf
41 - name: Configure lava-server allowed hosts
42 ansible.builtin.template:
43 src: allowed_hosts.yaml.j2
44 dest: /etc/lava-server/settings.d/00-hosts.yaml
49 - Restart lava-server-gunicorn
50 - name: Configure lava-server LDAP integration
51 ansible.builtin.template:
53 dest: /etc/lava-server/settings.d/01-ldap.yaml
58 - Restart lava-server-gunicorn
59 - name: Add lava devices
60 include_tasks: enable_device.yml
66 - name: Clone lttng-ci repo
68 become_user: lavaserver
70 dest: /var/lib/lava-server/home/lttng-ci
71 repo: https://github.com/lttng/lttng-ci
72 register: clone_result
73 - name: List devices in lttng-ci repo
74 when: clone_result.before != clone_result.after
77 - /var/lib/lava-server/home/lttng-ci/lava/devices/
78 register: found_lava_devices
79 - name: Create device links
80 when: clone_result.before != clone_result.after
83 path: "/etc/lava-server/dispatcher-config/devices/{{item | basename }}"
85 loop: "{{found_lava_devices['files'] | map(attribute='path')}}"
86 - name: Configure PDU Daemon
87 import_tasks: pdudaemon.yml
88 - name: Generate root SSH keypair
89 # The public key can be installed on qemu hosts
90 # lava-worker runs as root, not as lavaserver.
91 community.crypto.openssh_keypair:
92 path: /root/.ssh/id_ed25519