diff --git a/roles/abrt/retrace/defaults/main.yml b/roles/abrt/retrace/defaults/main.yml
index 3a64a79a2d..8e7e1ac6d7 100644
--- a/roles/abrt/retrace/defaults/main.yml
+++ b/roles/abrt/retrace/defaults/main.yml
@@ -147,6 +147,38 @@ rs_email_notify: false
# Who sends the e-mail notifications
rs_email_notify_from_user: retrace
+# Calculate md5sum for remote resources - changeable on manager page
+rs_calculate_md5: 0
+
+# URL of Bugzilla
+rs_bugzilla_url: "https://bugzilla.redhat.com"
+# Custom path to the file with Bugzilla credentials, stored in format:
+# [bugzilla.yoursite.com]
+# user =
+# password =
+# If not set checks for credentials in:
+# ~/.config/python-bugzilla/bugzillarc, ~/.bugzillarc, /etc/bugzillarc
+rs_bugzilla_credentials_path:
+
+# Clean up tasks with assigned bugzilla bugs in following states
+# NEW, ASSIGNED, ON_DEV, POST, MODIFIED, ON_QA, VERIFIED, RELEASE_PENDING, CLOSED
+rs_bugzilla_status: "VERIFIED, RELEASE_PENDING, CLOSED"
+
+# Search query options for bugzilla bugs
+rs_bugzilla_product: "Red Hat Enterprise Linux 7"
+
+rs_bugzilla_component: "kernel"
+
+# Number and order of values in TriggerWords and RegExes should be identical
+# Trigger words to look for in the text of bugzilla bugs
+rs_bugzilla_triggerwords: "retrace-server-interact, retrace/tasks"
+
+# Regular expressions used to get task numbers from the text of bugzilla bugs
+rs_bugzilla_regexes: "retrace-server-interact\\s+([0-9]{9}), /var/spool/retrace-server/([0-9]{9})/crash/vmcore"
+
+# Timeout (in seconds) for communication with any process
+rs_process_communicate_timeout: 3600
+
rs_archhosts:
- { arch: i386, url: }
- { arch: x86_64, url: }
diff --git a/roles/abrt/retrace/handlers/main.yml b/roles/abrt/retrace/handlers/main.yml
index e379288d84..4a61966eed 100644
--- a/roles/abrt/retrace/handlers/main.yml
+++ b/roles/abrt/retrace/handlers/main.yml
@@ -1,3 +1,5 @@
---
- name: restart httpd
- service: name=httpd state=restarted
+ service:
+ name: httpd
+ state: restarted
diff --git a/roles/abrt/retrace/meta/.galaxy_install_info b/roles/abrt/retrace/meta/.galaxy_install_info
index 25b3bf9775..d2a88effe3 100644
--- a/roles/abrt/retrace/meta/.galaxy_install_info
+++ b/roles/abrt/retrace/meta/.galaxy_install_info
@@ -1 +1,2 @@
-{install_date: 'Wed Apr 18 11:23:28 2018', version: ''}
+install_date: Thu Jul 4 13:16:08 2019
+version: el7
diff --git a/roles/abrt/retrace/tasks/check.yml b/roles/abrt/retrace/tasks/check.yml
index d4411b0653..371bbefb56 100644
--- a/roles/abrt/retrace/tasks/check.yml
+++ b/roles/abrt/retrace/tasks/check.yml
@@ -8,9 +8,11 @@
settings_url: "https://{{ ansible_default_ipv4.address }}/settings"
- name: fetch settings
- local_action: uri url={{ settings_url }}
- return_content=yes
- validate_certs=no
+ local_action:
+ module: uri
+ url: "{{ settings_url }}"
+ return_content: yes
+ validate_certs: no
register: uri_res
- fail: msg="{{ settings_url }} doesn't contain supported_releases"
diff --git a/roles/abrt/retrace/tasks/config.yml b/roles/abrt/retrace/tasks/config.yml
index ce1ff3dca9..4d4f085665 100644
--- a/roles/abrt/retrace/tasks/config.yml
+++ b/roles/abrt/retrace/tasks/config.yml
@@ -1,10 +1,12 @@
---
- name: configure retrace-server
- template: src=etc-retrace-server.conf.j2
- dest=/etc/retrace-server.conf
+ template:
+ src: etc-retrace-server.conf.j2
+ dest: /etc/retrace-server.conf
notify: restart httpd
- name: retrace-server http config
- template: src=retrace-server-httpd.conf.j2
- dest=/etc/httpd/conf.d/retrace-server-httpd.conf
+ template:
+ src: retrace-server-httpd.conf.j2
+ dest: /etc/httpd/conf.d/retrace-server-httpd.conf
notify: restart httpd
diff --git a/roles/abrt/retrace/tasks/install.yml b/roles/abrt/retrace/tasks/install.yml
index 44afdc5526..40209386ac 100644
--- a/roles/abrt/retrace/tasks/install.yml
+++ b/roles/abrt/retrace/tasks/install.yml
@@ -1,7 +1,11 @@
---
- name: erase retrace-server packages
- package: name=retrace-server state=absent
- when: rs_force_reinstall
+ package:
+ name: retrace-server
+ state: absent
+ when: rs_force_reinstall|bool
- name: install retrace-server package
- package: name=retrace-server state=present
+ package:
+ name: retrace-server
+ state: present
diff --git a/roles/abrt/retrace/tasks/main.yml b/roles/abrt/retrace/tasks/main.yml
index 9b6d63e222..8edacbe781 100644
--- a/roles/abrt/retrace/tasks/main.yml
+++ b/roles/abrt/retrace/tasks/main.yml
@@ -5,7 +5,7 @@
# Set up use of FAF packages
- import_tasks: usefafpkgs.yml
- when: rs_use_faf_packages
+ when: rs_use_faf_packages|bool
tags: [rs, use_faf_packages]
# Configure retrace-server
@@ -14,5 +14,5 @@
# Check functionality of the retrace-server
- import_tasks: check.yml
- when: rs_check_health
+ when: rs_check_health|bool
tags: [rs, check]
diff --git a/roles/abrt/retrace/tasks/usefafpkgs.yml b/roles/abrt/retrace/tasks/usefafpkgs.yml
index b134252853..a23817e524 100644
--- a/roles/abrt/retrace/tasks/usefafpkgs.yml
+++ b/roles/abrt/retrace/tasks/usefafpkgs.yml
@@ -6,32 +6,48 @@
changed_when: false
- name: add user retrace to faf db
- postgresql_user: db=faf
- name=retrace
- priv=ALL
- role_attr_flags=SUPERUSER
- state=present
+ postgresql_user:
+ db: faf
+ name: retrace
+ priv: ALL
+ role_attr_flags: SUPERUSER
+ state: present
become: yes
become_user: postgres
# for already existing files/dirs
- name: ACL for user retrace
- acl: path="{{ faf_spool_dir }}/lob" state=present recursive=yes
- entity=retrace etype=user permissions=rwX
+ acl:
+ path: "{{ faf_spool_dir }}/lob"
+ state: present
+ recursive: yes
+ entity: retrace
+ etype: user
+ permissions: rwX
async: 21600
poll: 0
# for files/dirs created in future
- name: default ACL for user retrace
- acl: path="{{ faf_spool_dir }}/lob" state=present recursive=yes default=yes
- entity=retrace etype=user permissions=rwX
+ acl:
+ path: "{{ faf_spool_dir }}/lob"
+ state: present
+ recursive: yes
+ default: yes
+ entity: retrace
+ etype: user
+ permissions: rwX
async: 21600
poll: 0
- name: check for hardlink dir
- stat: path={{ rs_faf_link_dir }}
+ stat: path="{{ rs_faf_link_dir }}"
register: rsdir
- name: make dir for hardlinks
- file: path={{ rs_faf_link_dir }} state=directory owner=retrace group=retrace
+ file:
+ path: "{{ rs_faf_link_dir }}"
+ state: directory
+ owner: retrace
+ group: retrace
when: rsdir.stat.exists == False
diff --git a/roles/abrt/retrace/templates/etc-retrace-server.conf.j2 b/roles/abrt/retrace/templates/etc-retrace-server.conf.j2
index edda02fab5..376f19fd5f 100644
--- a/roles/abrt/retrace/templates/etc-retrace-server.conf.j2
+++ b/roles/abrt/retrace/templates/etc-retrace-server.conf.j2
@@ -151,6 +151,33 @@ EmailNotify = {{ rs_email_notify|int }}
# Who sends the e-mail notifications
EmailNotifyFrom = {{ rs_email_notify_from_user }}@{{ hostname }}
+# Calculate md5sum for remote resources - changeable on manager page
+CalculateMd5 = {{ rs_calculate_md5 }}
+
+# URL of Bugzilla
+BugzillaURL = {{ rs_bugzilla_url }}
+# Custom path to the file with Bugzilla credentials, stored in format:
+# [bugzilla.yoursite.com]
+# user =
+# password =
+# If not set checks for credentials in:
+# ~/.config/python-bugzilla/bugzillarc, ~/.bugzillarc, /etc/bugzillarc
+BugzillaCredentials = {{ rs_bugzilla_credentials_path }}
+# Clean up tasks with assigned bugzilla bugs in following states
+# NEW, ASSIGNED, ON_DEV, POST, MODIFIED, ON_QA, VERIFIED, RELEASE_PENDING, CLOSED
+BugzillaStatus = {{ rs_bugzilla_status }}
+# Search query options for bugzilla bugs
+BugzillaProduct = {{ rs_bugzilla_product }}
+BugzillaComponent = {{ rs_bugzilla_component }}
+# Number and order of values in TriggerWords and RegExes should be identical
+# Trigger words to look for in the text of bugzilla bugs
+BugzillaTriggerWords = {{ rs_bugzilla_triggerwords }}
+# Regular expressions used to get task numbers from the text of bugzilla bugs
+BugzillaRegExes = {{ rs_bugzilla_regexes }}
+
+# Timeout (in seconds) for communication with any process
+ProcessCommunicateTimeout = {{ rs_process_communicate_timeout|int }}
+
[archhosts]
{% for a in rs_archhosts %}
{{ a.arch }} = {{ a.url|default('', true) }}
diff --git a/roles/abrt/retrace/templates/retrace-server-httpd.conf.j2 b/roles/abrt/retrace/templates/retrace-server-httpd.conf.j2
index 8e65e3af30..e6f9339a2b 100644
--- a/roles/abrt/retrace/templates/retrace-server-httpd.conf.j2
+++ b/roles/abrt/retrace/templates/retrace-server-httpd.conf.j2
@@ -33,6 +33,7 @@ WSGIScriptAliasMatch ^/$ /usr/share/retrace-server/index.wsgi
WSGIProcessGroup retrace
+ WSGIApplicationGroup %{GLOBAL}
Options -Indexes -FollowSymLinks
# Apache 2.4
@@ -45,4 +46,9 @@ WSGIScriptAliasMatch ^/$ /usr/share/retrace-server/index.wsgi
-Alias /repos /var/cache/retrace-server
+Alias /repos {{ rs_repo_dir }}
+
+ Require all granted
+ Options Indexes FollowSymLinks
+ IndexOptions FancyIndexing
+