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
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
|
Loading…
Add table
Add a link
Reference in a new issue