mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-04-27 03:52:09 +08:00
Split koschei role into backend and frontend
This commit is contained in:
@@ -19,7 +19,8 @@
|
||||
- builder_repo
|
||||
- collectd/base
|
||||
- apache
|
||||
- koschei
|
||||
- koschei/backend
|
||||
- koschei/frontend
|
||||
- fedmsg/base
|
||||
- sudo
|
||||
- { role: openvpn/client, when: env != "staging" }
|
||||
|
||||
@@ -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:
|
||||
@@ -1,5 +0,0 @@
|
||||
[koschei-jenkins]
|
||||
name=koschei-jenkins
|
||||
baseurl=http://jenkins.fedorainfracloud.org/job/koschei-rpm/ws/rpms/
|
||||
enabled=0
|
||||
gpgcheck=0
|
||||
55
roles/koschei/frontend/tasks/main.yml
Normal file
55
roles/koschei/frontend/tasks/main.yml
Normal 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
|
||||
1
roles/koschei/frontend/templates/config.cfg.j2
Symbolic link
1
roles/koschei/frontend/templates/config.cfg.j2
Symbolic link
@@ -0,0 +1 @@
|
||||
../../backend/templates/config.cfg.j2
|
||||
Reference in New Issue
Block a user