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
edx
configuration
Commits
08fda3d0
Commit
08fda3d0
authored
9 years ago
by
Max Rothman
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2631 from edx/max/upgrade-nginx
SEC-79: Install nginx from their ppa
parents
03c8aa2d
1ea21557
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
3 deletions
+46
-3
playbooks/roles/nginx/defaults/main.yml
+1
-1
playbooks/roles/nginx/tasks/main.yml
+45
-2
No files found.
playbooks/roles/nginx/defaults/main.yml
View file @
08fda3d0
...
...
@@ -51,6 +51,7 @@ NGINX_SERVER_HTML_FILES:
img
:
"
{{
NGINX_SERVER_ERROR_IMG
}}"
heading
:
'
Uh
oh,
we
are
having
some
server
issues..'
NGINX_APT_REPO
:
deb http://nginx.org/packages/ubuntu/ {{ ansible_distribution_release }} nginx
nginx_app_dir
:
"
{{
COMMON_APP_DIR
}}/nginx"
...
...
@@ -64,7 +65,6 @@ nginx_user: root
nginx_htpasswd_file
:
"
{{
nginx_app_dir
}}/nginx.htpasswd"
nginx_default_sites
:
[]
nginx_debian_pkgs
:
-
nginx
-
python-passlib
NGINX_EDXAPP_ENABLE_S3_MAINTENANCE
:
False
...
...
This diff is collapsed.
Click to expand it.
playbooks/roles/nginx/tasks/main.yml
View file @
08fda3d0
...
...
@@ -33,8 +33,51 @@
-
install
-
install:configuration
-
name
:
Install nginx packages
apt
:
pkg={{','.join(nginx_debian_pkgs)}} state=present
-
name
:
Install needed packages
apt
:
pkg={{ item }} state=present
notify
:
restart nginx
with_items
:
nginx_debian_pkgs
tags
:
-
install
-
install:system-requirements
-
name
:
Add apt key
apt_key
:
url
:
http://nginx.org/keys/nginx_signing.key
state
:
present
notify
:
restart nginx
tags
:
-
install
-
install:system-requirements
-
name
:
Add nginx repository
apt_repository
:
repo
:
"
{{
NGINX_APT_REPO
}}"
state
:
present
notify
:
restart nginx
tags
:
-
install
-
install:system-requirements
# REMOVE THIS AFTER LATEST NGINX HAS BEEN DEPLOYED EVERYWHERE
# New package does not identify conflicts properly.
# "nginx-common" only appears as requirement for ubuntu-distributed package, thus
# removing it will remove all nginx packages installed from Ubuntu's repo.
# This is only required if nginx was previously installed from Ubuntu's repo
# and you're switching to Nginx's PPA
-
name
:
Remove old nginx packages
apt
:
name
:
nginx-common
state
:
absent
tags
:
-
install
-
install:system-requirements
-
name
:
Install the nginx package
apt
:
name
:
nginx
state
:
latest
update_cache
:
yes
notify
:
restart nginx
tags
:
-
install
...
...
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