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.
 

40 lines
1.1 KiB

- hosts: all
tasks:
- name: Add stretch-backports to apt sources list
apt_repository:
repo: "deb http://ftp.debian.org/debian stretch-backports main"
- name: Install lava-server from backports
apt:
name:
- lava-server
- lava-tool
- linux-image-amd64
state: present
default_release: stretch-backports
update_cache: yes
cache_valid_time: 3600
- 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 --noinput
- name: Set default password
expect:
command: lava-server manage changepassword root
responses:
Password: root
Password (again): root
handlers:
- name: reload apache
service:
name: apache2
state: reloaded