Add serve browbeat results out of httpd to browbeat install playbook.
Change-Id: If623b5c06fff8c084e50ddb2227ed3a06160cdbd
This commit is contained in:
parent
9b1b4d75f1
commit
489306ef15
@ -5,6 +5,8 @@
|
||||
|
||||
- hosts: undercloud
|
||||
remote_user: stack
|
||||
vars:
|
||||
results_in_httpd: true
|
||||
roles:
|
||||
- common
|
||||
- browbeat
|
||||
|
14
ansible/install/roles/browbeat/files/00-browbeat.conf
Normal file
14
ansible/install/roles/browbeat/files/00-browbeat.conf
Normal file
@ -0,0 +1,14 @@
|
||||
# Browbeat httpd config to serve results on undercloud
|
||||
# Installed via browbeat installer
|
||||
|
||||
Listen 9000
|
||||
<VirtualHost *:9000>
|
||||
ServerName browbeat-results
|
||||
DocumentRoot "/home/stack/browbeat/results"
|
||||
<Directory "/home/stack/browbeat/results">
|
||||
Options Indexes FollowSymLinks
|
||||
IndexOptions NameWidth=*
|
||||
AllowOverride None
|
||||
Require all granted
|
||||
</Directory>
|
||||
</VirtualHost>
|
8
ansible/install/roles/browbeat/handlers/main.yml
Normal file
8
ansible/install/roles/browbeat/handlers/main.yml
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
#
|
||||
# Browbeat installer handlers
|
||||
#
|
||||
|
||||
- name: restart httpd
|
||||
service: name=httpd state=restarted
|
||||
become: true
|
@ -43,6 +43,44 @@
|
||||
- name: Setup Rally deployment
|
||||
shell: . /home/stack/browbeat-venv/bin/activate; . /home/stack/overcloudrc; rally deployment create --fromenv --name overcloud
|
||||
|
||||
#
|
||||
# Serve results out of httpd if results_in_httpd is set to true
|
||||
#
|
||||
|
||||
- name: Setup browbeat.conf in /etc/httpd/conf.d
|
||||
copy:
|
||||
src: 00-browbeat.conf
|
||||
dest: /etc/httpd/conf.d/00-browbeat.conf
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
become: true
|
||||
when: results_in_httpd
|
||||
notify:
|
||||
- restart httpd
|
||||
|
||||
- name: Check iptables for browbeat port(9000)
|
||||
shell: iptables -nvL | grep -q "dpt:9000"
|
||||
become: true
|
||||
changed_when: false
|
||||
when: results_in_httpd
|
||||
register: browbeat_results_port
|
||||
ignore_errors: true
|
||||
|
||||
- name: Open iptables for browbeat port(9000)
|
||||
shell: /usr/sbin/iptables -I INPUT 1 -p tcp --dport 9000 -j ACCEPT
|
||||
become: true
|
||||
when: results_in_httpd and browbeat_results_port.rc == 1
|
||||
|
||||
- name: Set seboolean(httpd_read_user_content)
|
||||
seboolean: name=httpd_read_user_content state=yes persistent=yes
|
||||
become: true
|
||||
when: results_in_httpd
|
||||
|
||||
- name: Allow httpd to serve content in /home/stack
|
||||
file: path=/home/stack state=directory mode=0755
|
||||
when: results_in_httpd
|
||||
|
||||
#
|
||||
# Nova boot image tasks
|
||||
#
|
||||
|
Loading…
x
Reference in New Issue
Block a user