Skip to content

Commit

Permalink
Do conditional stuff for apache 2.2
Browse files Browse the repository at this point in the history
Since we are running CI on Travis and Ubuntu 12.04 images, we are also running
Apache 2.2. There is some logic in our plays that makes some Apache 2.4
assumption. This commit adds logic to make Apache happy when running
keystone-deploy against Ubuntu 12.04 or Ubuntu 14.04.
  • Loading branch information
lbragstad committed Jul 8, 2015
1 parent 35f7af5 commit 33fc63c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion playbooks/roles/apache2/tasks/main.yaml
Expand Up @@ -31,7 +31,8 @@

- name: enable mpm_prefork
command: a2enmod mpm_prefork
when: not mpm_prefork.stat.exists
when: not mpm_prefork.stat.exists and
(ansible_lsb.id == "Ubuntu" and ansible_lsb.release == "14.04")

- name: remove the default virtual host
file:
Expand Down
2 changes: 2 additions & 0 deletions playbooks/roles/echo/templates/apache/echo.vhost
Expand Up @@ -5,9 +5,11 @@
ServerLimit {{ virtual_hosts * process_count }}
MaxClients {{ virtual_hosts * process_count }}
StartServers {{ virtual_hosts * process_count }}
{% if apache24|success -%}
MinSpareServers {{ process_count }}
MaxSpareServers {{ process_count }}
MaxRequestWorkers {{ virtual_hosts * process_count * thread_count }}
{%- endif %}

<VirtualHost *:80>
WSGIScriptAlias / /var/echo/echo.py
Expand Down
2 changes: 2 additions & 0 deletions playbooks/roles/keystone/templates/apache/keystone.vhost
Expand Up @@ -5,9 +5,11 @@
ServerLimit {{ virtual_hosts * process_count }}
MaxClients {{ virtual_hosts * process_count }}
StartServers {{ virtual_hosts * process_count }}
{% if apache24|success -%}
MinSpareServers {{ process_count }}
MaxSpareServers {{ process_count }}
MaxRequestWorkers {{ virtual_hosts * process_count * thread_count }}
{%- endif %}

Listen 5000
Listen 35357
Expand Down

0 comments on commit 33fc63c

Please sign in to comment.