ansible/roles/kerneltest/tasks/main.yml

67 lines
1.7 KiB
YAML
Raw Normal View History

2014-06-17 17:52:59 +02:00
---
# Configuration for the kerneltest webapp
- name: Install needed packages
package: name={{ item }} state=present update_cache=yes
2014-06-17 17:52:59 +02:00
with_items:
- kerneltest
- python-psycopg2
- python-openid-cla
- python-openid-teams
- python-memcached
- libsemanage-python
tags:
- packages
2015-06-16 20:49:39 +00:00
- kerneltest
2014-06-17 17:52:59 +02:00
- name: Create the folder to store the logs
ansible.builtin.file: state=directory
2014-06-17 17:52:59 +02:00
path=/var/www/logs
owner=apache group=apache mode=0755
2015-06-16 20:49:39 +00:00
tags:
- kerneltest
2014-06-17 17:52:59 +02:00
- 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
2015-06-16 20:49:39 +00:00
- kerneltest
2014-06-17 17:52:59 +02:00
notify:
- restart apache
- name: Create the database scheme
when: inventory_hostname.startswith('kerneltest01')
2014-06-17 17:52:59 +02:00
command: /usr/bin/python2 /usr/share/kerneltest/kerneltest_createdb.py
environment:
KERNELTEST_CONFIG: /etc/kerneltest/kerneltest.cfg
2015-06-16 20:49:39 +00:00
tags:
- kerneltest
2014-06-17 17:52:59 +02:00
- name: Set sebooleans so the app can talk to the db and send emails
seboolean: name=httpd_can_network_connect state=true persistent=true
2015-06-16 20:49:39 +00:00
tags:
- kerneltest
- selinux
- name: Set sebooleans so the app can talk to the db and send emails
2016-03-04 23:58:47 +00:00
seboolean: name=httpd_can_network_connect_db persistent=yes state=yes
tags:
- kerneltest
- selinux
- name: Apply selinux type to log files
ansible.builtin.file: >
2014-07-02 17:38:51 +02:00
dest=/var/www/logs
setype=httpd_sys_rw_content_t
2014-07-02 17:38:51 +02:00
state=directory
recurse=yes
2015-06-16 20:49:39 +00:00
tags:
- kerneltest
- selinux