Ansible playbooks for managing a LAVA server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
981 B

- hosts: all
tasks:
- name: Install dependencies
apt:
name:
- postgresql
- lava-server
- apache2
state: present
update_cache: yes
cache_valid_time: 3600
notify: reload apache
- name: Disable default site
shell: a2dissite 000-default
args:
removes: /etc/apache2/sites-enabled/000-default.conf
- name: Enable proxy module
apache2_module:
name: proxy_http
- name: Enable the lava site
shell: a2ensite lava-server
args:
creates: /etc/apache2/sites-enabled/lava-server.conf
notify: reload apache
- name: Create root account
shell: lava-server manage createsuperuser --username root --email root@example.com --noinput
- name: Set temporary password
expect:
command: lava-server manage changepassword root
responses:
Password: root
Password (again): root
handlers:
- name: reload apache
service:
name: apache2
state: reloaded