Split koschei role into backend and frontend

This commit is contained in:
Michael Simacek
2016-04-08 16:25:53 +02:00
parent 718f1c6c55
commit 9f38fa4da2
13 changed files with 70 additions and 38 deletions

View File

@@ -19,7 +19,8 @@
- builder_repo
- collectd/base
- apache
- koschei
- koschei/backend
- koschei/frontend
- fedmsg/base
- sudo
- { role: openvpn/client, when: env != "staging" }

View File

@@ -1,14 +1,6 @@
- name: Install jenkins repo on stg
copy: src=jenkins.repo dest=/etc/yum.repos.d/jenkins.repo
when: env == "staging"
tags:
- koschei
- config
- packages
- yumrepos
- name: install packages
package: name={{ item }} state=installed
when: env != "staging"
with_items:
- koschei
- lbzip2
@@ -17,6 +9,17 @@
- koschei
- packages
- name: install packages
package: name={{ item }} state=installed
when: env == "staging"
with_items:
- koschei-admin
- koschei-backend
- postgresql
tags:
- koschei
- packages
- name: install config files
template: >
src="{{ item }}.j2"
@@ -32,7 +35,6 @@
- restart koschei-resolver
- restart koschei-scheduler
- restart koschei-watcher
- reload httpd
tags:
- koschei
- config
@@ -74,7 +76,6 @@
- restart koschei-resolver
- restart koschei-scheduler
- restart koschei-watcher
- reload httpd
tags:
- koschei
- config
@@ -87,16 +88,6 @@
- koschei
- config
- name: install httpd config file
template: >
src="httpd.conf.j2"
dest="/etc/httpd/conf.d/koschei.conf"
notify:
- reload httpd
tags:
- koschei
- config
- name: enable services to start on boot
service: name={{ item }} state=running enabled=true
with_items:
@@ -108,17 +99,6 @@
- koschei
- service
- name: allow httpd to connect to db
seboolean: name={{ item }} state=yes persistent=yes
with_items:
- httpd_can_network_connect
- httpd_can_network_connect_db
notify:
- reload httpd
tags:
- koschei
- selinux
- name: Copy the cleanup cronjob
template: src=cron-db-cleanup.j2 dest=/etc/cron.d/cron-db-cleanup
tags:

View File

@@ -1,5 +0,0 @@
[koschei-jenkins]
name=koschei-jenkins
baseurl=http://jenkins.fedorainfracloud.org/job/koschei-rpm/ws/rpms/
enabled=0
gpgcheck=0

View File

@@ -0,0 +1,55 @@
- name: install packages
package: name={{ item }} state=installed
when: env != "staging"
with_items:
- koschei
- lbzip2
- postgresql
tags:
- koschei
- packages
- name: install packages
package: name={{ item }} state=installed
when: env == "staging"
with_items:
- koschei-frontend
tags:
- koschei
- packages
- name: install config files
template: >
src="{{ item }}.j2"
dest="/etc/koschei/{{ item }}"
owner=koschei
group=koschei
mode=0400
with_items:
- config.cfg
notify:
- reload httpd
tags:
- koschei
- config
- name: install httpd config file
template: >
src="httpd.conf.j2"
dest="/etc/httpd/conf.d/koschei.conf"
notify:
- reload httpd
tags:
- koschei
- config
- name: allow httpd to connect to db
seboolean: name={{ item }} state=yes persistent=yes
with_items:
- httpd_can_network_connect
- httpd_can_network_connect_db
notify:
- reload httpd
tags:
- koschei
- selinux

View File

@@ -0,0 +1 @@
../../backend/templates/config.cfg.j2