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
941a72e7
Commit
941a72e7
authored
8 years ago
by
arbabnazar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
write ansible tasks with YAML syntax
parent
27512714
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
21 deletions
+38
-21
playbooks/roles/apache/handlers/main.yml
+5
-2
playbooks/roles/apache/tasks/main.yml
+33
-19
No files found.
playbooks/roles/apache/handlers/main.yml
View file @
941a72e7
---
-
name
:
restart apache
service
:
name=apache2 state=restarted
tags
:
deploy
service
:
name
:
apache2
state
:
restarted
tags
:
-
deploy
This diff is collapsed.
Click to expand it.
playbooks/roles/apache/tasks/main.yml
View file @
941a72e7
# Installs apache and runs the lms wsgi by default
---
-
name
:
Installs apache and mod_wsgi from apt
apt
:
pkg={{ item }} install_recommends=no state=present update_cache=yes
apt
:
name
:
"
{{
item
}}"
install_recommends
:
no
state
:
present
update_cache
:
yes
with_items
:
-
apache2
-
libapache2-mod-wsgi
notify
:
restart apache
-
name
:
disables default site
command
:
a2dissite 000-default
-
name
:
Disables default site
file
:
path
:
/etc/apache2/sites-enabled/000-default
state
:
absent
notify
:
restart apache
-
name
:
rewrite apache ports conf
template
:
dest=/etc/apache2/ports.conf src=ports.conf.j2 owner=root group=root
-
name
:
Rewrite apache ports conf
template
:
src
:
ports.conf.j2
dest
:
/etc/apache2/ports.conf
owner
:
root
group
:
root
notify
:
restart apache
-
debug
:
msg={{ apache_sites }}
-
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
-
name
:
"
Copying
apache
configs
for
{{
apache_sites
}}"
template
:
src
:
"
{{
item
}}.j2"
dest
:
"
/etc/apache2/sites-available/{{
item
}}"
owner
:
root
group
:
"
{{
common_web_user
}}"
mode
:
"
0640"
notify
:
restart apache
with_items
:
apache_sites
with_items
:
"
{{
apache_sites
}}"
-
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
-
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
with_items
:
"
{{
apache_sites
}}"
This diff is collapsed.
Click to expand it.
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