ansible/roles/kerneltest/tasks/main.yml
Patrick Uiterwijk 936e8b261a yum accepted pkg=, package calls it name=
Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
2017-10-09 00:38:26 +02:00

66 lines
1.7 KiB
YAML

---
# Configuration for the kerneltest webapp
- name: install needed packages
package: name={{ item }} state=present update_cache=yes
with_items:
- kerneltest
- python-psycopg2
- python-openid-cla
- python-openid-teams
- python-memcached
- libsemanage-python
tags:
- packages
- kerneltest
- name: Create the folder to store the logs
file: state=directory
path=/var/www/logs
owner=apache group=apache mode=0755
tags:
- kerneltest
- name: Install all the configuration file of kerneltest
template: src={{ item.file }}
dest={{ item.location }}/{{ item.file }}
owner=apache group=apache mode=0600
with_items:
- { file: kerneltest.cfg, location: /etc/kerneltest }
- { file: kerneltest.conf, location: /etc/httpd/conf.d }
- { file: kerneltest.wsgi, location: /var/www/ }
tags:
- config
- kerneltest
notify:
- restart apache
- name: create the database scheme
when: inventory_hostname.startswith('kerneltest01')
command: /usr/bin/python2 /usr/share/kerneltest/kerneltest_createdb.py
environment:
KERNELTEST_CONFIG: /etc/kerneltest/kerneltest.cfg
tags:
- kerneltest
- name: set sebooleans so the app can talk to the db and send emails
seboolean: name=httpd_can_network_connect state=true persistent=true
tags:
- kerneltest
- selinux
- name: set sebooleans so the app can talk to the db and send emails
seboolean: name=httpd_can_network_connect_db persistent=yes state=yes
tags:
- kerneltest
- selinux
- name: apply selinux type to log files
file: >
dest=/var/www/logs
setype=httpd_sys_rw_content_t
state=directory
recurse=yes
tags:
- kerneltest
- selinux