Files
ansible-role-mbs/tasks/mbs-frontend.yml
Brian Stinson 284eeba1e2 some template changes
Signed-off-by: Brian Stinson <bstinson@redhat.com>
2021-05-25 14:17:57 -05:00

68 lines
1.4 KiB
YAML

---
- name: Configuring httpd
include_role:
name: httpd
- include_role:
name: httpd
vars:
- httpd_tls: "{{ mbs_frontend_https_enabled | bool }}"
- include_role:
name: httpd
tasks_from: pki-tls
vars:
pki_hostname: "{{ mbs_frontend_host }}"
when: mbs_frontend_https_enabled | bool
- name: Install mbs-frontend packages
yum:
name:
- python3-mod_wsgi
- module-build-service
- mod_auth_gssapi
state: installed
notify:
- Restart apache
- name: Copy mbs httpd config
template:
src: "mbs/mbs.conf.j2"
dest: "/etc/httpd/conf.d/mbs.conf"
owner: apache
group: apache
mode: 0644
notify:
- Restart apache
- name: Ensure we have proper httpd keytab
copy:
src: "{{ pkistore }}/krb5/{{ mbs_frontend_krb_keytab }}"
dest: "/etc/httpd/conf.d/{{ mbs_frontend_krb_keytab }}"
owner: apache
when: (mbs_config_no_auth | bool) == False
- name: Ensure /usr/share/mbs folder exists
file:
path: /usr/share/mbs/
state: directory
- name: Copy custom wsgi file
template:
src: mbs/mbs.wsgi.j2
dest: /usr/share/mbs/mbs.wsgi
mode: 0644
notify:
- Restart apache
- name: Ensure selinux lets httpd talk to postgres, memcached, and mail
seboolean:
name: "{{ item }}"
state: true
persistent: true
with_items:
- httpd_can_network_connect_db
- httpd_can_network_memcache
- httpd_can_network_connect
- httpd_can_sendmail