Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
configuration
Commits
64808728
Commit
64808728
authored
Mar 03, 2014
by
Carson Gee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updates to apache role to make it more flexible and inline with nginx
parent
4e8c0d1e
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
45 deletions
+31
-45
playbooks/roles/apache/defaults/main.yml
+5
-1
playbooks/roles/apache/handlers/main.yml
+1
-0
playbooks/roles/apache/meta/main.yml
+3
-0
playbooks/roles/apache/tasks/apache_site.yml
+0
-21
playbooks/roles/apache/tasks/main.yml
+18
-21
playbooks/roles/apache/templates/ports.conf.j2
+4
-2
No files found.
playbooks/roles/apache/defaults/main.yml
View file @
64808728
---
apache_port
:
80
apache_ports
:
-
80
apache_sites
:
-
lms
apache_template_dir
:
'
.'
playbooks/roles/apache/handlers/main.yml
View file @
64808728
---
-
name
:
restart apache
service
:
name=apache2 state=restarted
tags
:
deploy
playbooks/roles/apache/meta/main.yml
0 → 100644
View file @
64808728
---
dependencies
:
-
common
playbooks/roles/apache/tasks/apache_site.yml
deleted
100644 → 0
View file @
4e8c0d1e
# Requires nginx package
---
-
name
:
Copying apache config {{ site_name }}
template
:
src={{ item }} dest=/etc/apache2/sites-available/{{ site_name }}
first_available_file
:
-
"
{{
local_dir
}}/apache/templates/{{
site_name
}}.j2"
# seems like paths in first_available_file must be relative to the playbooks dir
-
"
roles/apache/templates/{{
site_name
}}.j2"
notify
:
restart apache
when
:
apache_role_run is defined
tags
:
-
apache
-
update
-
name
:
Creating apache2 config link {{ site_name }}
file
:
src=/etc/apache2/sites-available/{{ site_name }} dest=/etc/apache2/sites-enabled/{{ site_name }} state={{ state }} owner=root group=root
notify
:
restart apache
when
:
apache_role_run is defined
tags
:
-
apache
-
update
playbooks/roles/apache/tasks/main.yml
View file @
64808728
#
Installs apache and runs the lms wsgi
#
Installs apache and runs the lms wsgi by default
---
-
name
:
Installs apache and mod_wsgi from apt
...
...
@@ -7,30 +7,27 @@
-
apache2
-
libapache2-mod-wsgi
notify
:
restart apache
tags
:
-
apache
-
install
-
name
:
disables default site
command
:
a2dissite 000-default
notify
:
restart apache
tags
:
-
apache
-
install
-
name
:
rewrite apache ports conf
template
:
dest=/etc/apache2/ports.conf src=ports.conf.j2 owner=root group=root
notify
:
apache | restart apache
-
debug
:
msg={{ apache_sites }}
-
name
:
Copying apache configs for {{ apache_sites }}
template
:
>
src={{ apache_template_dir }}/{{ item }}.j2
dest=/etc/apache2/sites-available/{{ item }}
owner=root group={{ common_web_user }} mode=0640
notify
:
restart apache
tags
:
-
apache
-
install
-
name
:
Register the fact that apache role has run
command
:
echo True
register
:
apache_role_run
tags
:
-
apache
-
install
with_items
:
apache_sites
-
include
:
apache_site.yml state=link site_name=lms
-
name
:
Creating apache2 config links for {{ apache_sites }}
file
:
>
src=/etc/apache2/sites-available/{{ item }}
dest=/etc/apache2/sites-enabled/{{ item }}
state=link owner=root group=root
notify
:
restart apache
with_items
:
apache_sites
playbooks/roles/apache/templates/ports.conf.j2
View file @
64808728
NameVirtualHost *:{{ apache_port }}
Listen {{ apache_port }}
{%- for port in apache_ports -%}
NameVirtualHost *:{{ port }}
Listen {{ port }}
{% endfor %}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment