---
# Install additional packages
- import_tasks: install.yml

# Create database for faf
- import_tasks: setup_db.yml

# Allow https and start httpd
- import_tasks: services.yml

# landing page
- name: install abrt-server-info-page
  package: name=abrt-server-info-page state=latest

- name: configure ADMINS
  lineinfile:
    dest: /usr/lib/python2.7/site-packages/abrt-server-info-page/config.py
    regexp: 'ADMINS ='
    line: '    ADMINS = "infrastructure@lists.fedoraproject.org"'
  notify: restart httpd

- name: configure MORE_FAF
  lineinfile:
    dest: /usr/lib/python2.7/site-packages/abrt-server-info-page/config.py
    regexp: 'MORE_FAF ='
    line: '    MORE_FAF = "https://github.com/abrt/faf/"'
  notify: restart httpd

- name: configure MORE_RS
  lineinfile:
    dest: /usr/lib/python2.7/site-packages/abrt-server-info-page/config.py
    regexp: 'MORE_RS ='
    line: '    MORE_RS = "https://github.com/abrt/retrace-server"'
  notify: restart httpd

- name: configure MORE_ABRT
  lineinfile:
    dest: /usr/lib/python2.7/site-packages/abrt-server-info-page/config.py
    regexp: 'MORE_ABRT ='
    line: '    MORE_ABRT = "https://github.com/abrt/abrt/"'
  notify: restart httpd

- name: configure MORE_GABRT
  lineinfile:
    dest: /usr/lib/python2.7/site-packages/abrt-server-info-page/config.py
    regexp: 'MORE_GABRT ='
    line: '    MORE_GABRT = "https://github.com/abrt/gnome-abrt/"'
  notify: restart httpd

- name: configure MORE_LR
  lineinfile:
    dest: /usr/lib/python2.7/site-packages/abrt-server-info-page/config.py
    regexp: 'MORE_LR ='
    line: '    MORE_LR = "https://github.com/abrt/libreport/"'
  notify: restart httpd

- name: configure MORE_SATYR
  lineinfile:
    dest: /usr/lib/python2.7/site-packages/abrt-server-info-page/config.py
    regexp: 'MORE_SATYR ='
    line: '    MORE_SATYR = "https://github.com/abrt/satyr/"'
  notify: restart httpd
