lava-install.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. - hosts: all
  2. tasks:
  3. - name: Add stretch-backports to apt sources list
  4. apt_repository:
  5. repo: "deb http://ftp.debian.org/debian stretch-backports main"
  6. - name: Install lava-server from backports
  7. apt:
  8. name:
  9. - lava-server
  10. - lava-tool
  11. - linux-image-amd64
  12. state: present
  13. default_release: stretch-backports
  14. update_cache: yes
  15. cache_valid_time: 3600
  16. - name: Disable default site
  17. shell: a2dissite 000-default
  18. args:
  19. removes: /etc/apache2/sites-enabled/000-default.conf
  20. - name: Enable proxy module
  21. apache2_module:
  22. name: proxy_http
  23. - name: Enable the lava site
  24. shell: a2ensite lava-server
  25. args:
  26. creates: /etc/apache2/sites-enabled/lava-server.conf
  27. notify: reload apache
  28. - name: Create root account
  29. shell: lava-server manage createsuperuser --username root --noinput
  30. - name: Set default password
  31. expect:
  32. command: lava-server manage changepassword root
  33. responses:
  34. Password: root
  35. Password (again): root
  36. handlers:
  37. - name: reload apache
  38. service:
  39. name: apache2
  40. state: reloaded