Get basset frontend and most of backend into ansible
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
parent
23b420db3f
commit
8aacb87290
6 changed files with 83 additions and 0 deletions
|
@ -24,6 +24,9 @@
|
|||
- { role: openvpn/client,
|
||||
when: env != "staging" }
|
||||
- apache
|
||||
- mongodb
|
||||
- rabbitmq
|
||||
- basset/frontend
|
||||
|
||||
tasks:
|
||||
- include: "{{ tasks }}/yumrepos.yml"
|
||||
|
|
15
roles/basset/frontend/files/basset.conf
Normal file
15
roles/basset/frontend/files/basset.conf
Normal file
|
@ -0,0 +1,15 @@
|
|||
WSGIDaemonProcess basset user=basset group=basset threads=5
|
||||
WSGIScriptAlias /basset /usr/share/basset/basset-frontend
|
||||
|
||||
<Location /basset>
|
||||
AuthType basic
|
||||
AuthName "Basset Frontend"
|
||||
AuthUserFile "/etc/httpd/conf.d/basset.htpasswd"
|
||||
Require valid-user
|
||||
</Location>
|
||||
|
||||
<Directory /usr/share/basset>
|
||||
WSGIProcessGroup basset
|
||||
WSGIApplicationGroup %{GLOBAL}
|
||||
Require all granted
|
||||
</Directory>
|
25
roles/basset/frontend/tasks/main.yml
Normal file
25
roles/basset/frontend/tasks/main.yml
Normal file
|
@ -0,0 +1,25 @@
|
|||
- name: install needed packages
|
||||
yum: pkg={{ item }} state=present
|
||||
with_items:
|
||||
- basset-frontend
|
||||
tags:
|
||||
- basset
|
||||
- basset/frontend
|
||||
|
||||
- name: install staging htpasswd
|
||||
copy: src={{private}}/files/httpd/basset.stg.htpasswd dest=/etc/httpd/conf.d/basset.htpasswd
|
||||
owner=root group=root mode=0644
|
||||
notify:
|
||||
- restart httpd
|
||||
tags:
|
||||
- basset
|
||||
- basset/frontend
|
||||
|
||||
- name: install frontend config
|
||||
copy: src=basset.conf dest=/etc/httpd/conf.d/basset.conf
|
||||
owner=root group=root mode=0644
|
||||
notify:
|
||||
- restart httpd
|
||||
tags:
|
||||
- basset
|
||||
- basset/frontend
|
20
roles/basset/worker/tasks/main.yml
Normal file
20
roles/basset/worker/tasks/main.yml
Normal file
|
@ -0,0 +1,20 @@
|
|||
- name: install needed packages
|
||||
yum: pkg={{ item }} state=present
|
||||
with_items:
|
||||
- basset
|
||||
tags:
|
||||
- basset
|
||||
- basset/worker
|
||||
|
||||
- name: install worker config
|
||||
template: src=worker.cfg dest=/etc/basset/worker.cfg
|
||||
mode=0600 owner=basset-worker user=basset-worker
|
||||
tags:
|
||||
- basset
|
||||
- basset/worker
|
||||
|
||||
- name: start basset worker
|
||||
service: name=basset-worker state=started enabled=yes
|
||||
tags:
|
||||
- basset
|
||||
- basset/worker
|
11
roles/mongodb/tasks/main.yml
Normal file
11
roles/mongodb/tasks/main.yml
Normal file
|
@ -0,0 +1,11 @@
|
|||
- name: install needed packages
|
||||
yum: pkg={{ item }} state=present
|
||||
with_items:
|
||||
- mongodb-server
|
||||
tags: mongodb
|
||||
|
||||
# mongod is the single daemon. mongos is a sharded cluster router,
|
||||
# but just plain mongod is good enough for now
|
||||
- name: start mongodb
|
||||
service: name=mongod state=started enabled=yes
|
||||
tags: mongodb
|
9
roles/rabbitmq/tasks/main.yml
Normal file
9
roles/rabbitmq/tasks/main.yml
Normal file
|
@ -0,0 +1,9 @@
|
|||
- name: install needed packages
|
||||
yum: pkg={{ item }} state=present
|
||||
with_items:
|
||||
- rabbitmq-server
|
||||
tags: rabbitmq
|
||||
|
||||
- name: start rabbitmq
|
||||
service: name=rabbitmq-server state=started enabled=yes
|
||||
tags: rabbitmq
|
Loading…
Add table
Add a link
Reference in a new issue