ansible/roles/taskotron/resultsdb-frontend/tasks/main.yml
Kevin Fenzi 81fb4582e7 ansible: change when conditions to use == instead of is when checking strings.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-04-24 21:34:10 +02:00

38 lines
1.4 KiB
YAML

---
- name: start httpd (provided in the apache role)
service: name=httpd state=started
- name: ensure packages required for resultsdb_frontend are installed (yum - required for testdays)
package:
state: present
name:
- resultsdb_frontend
- mod_wsgi
when: ansible_distribution_major_version|int <= 7 and ansible_distribution == 'RedHat'
- name: ensure packages required for resultsdb_frontend are installed (dnf)
dnf: name={{ item }} state=present
with_items:
- resultsdb_frontend
- python3-mod_wsgi
when: ansible_distribution_major_version|int >= 29 and ansible_distribution == 'Fedora' and ansible_cmdline.ostree is not defined
- name: ensure packages required for resultsdb_frontend are installed (dnf)
dnf: name={{ item }} state=present
with_items:
- resultsdb_frontend
- python3-mod_wsgi
when: ansible_distribution_major_version|int > 7 and ansible_distribution == 'RedHat' and ansible_cmdline.ostree is not defined
- name: ensure selinux lets httpd talk to the network
seboolean: name=httpd_can_network_connect persistent=yes state=yes
- name: generate resultsdb_frontend config
template: src=settings.py.j2 dest=/etc/resultsdb_frontend/settings.py owner=root group=root mode=0644
notify:
- reload httpd
- name: generate resultsdb_frontend apache config
template: src=resultsdb_frontend.conf.j2 dest=/etc/httpd/conf.d/resultsdb_frontend.conf owner=root group=root mode=0644
notify:
- reload httpd