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
b8ed4f49
Commit
b8ed4f49
authored
8 years ago
by
Ned Batchelder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
We need a custom edX PPA for all versions of Debian
parent
fb34593d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
38 deletions
+31
-38
playbooks/roles/common/tasks/main.yml
+25
-28
playbooks/roles/common_vars/defaults/main.yml
+3
-3
util/install/ansible-bootstrap.sh
+3
-7
No files found.
playbooks/roles/common/tasks/main.yml
View file @
b8ed4f49
...
...
@@ -9,7 +9,7 @@
-
"
install:configuration"
# ubuntu
-
stat
:
-
stat
:
path
:
"
/usr/sbin/update-ca-certificates"
register
:
update_ca_certificates
...
...
@@ -52,25 +52,22 @@
when
:
ansible_distribution in common_debian_variants
# Ensure that we
get the latest version of python 2.7
-
name
:
add edx ppa
apt key
# Ensure that we
can install old software if need be.
-
name
:
Add edX PPA
apt key
apt_key
:
id
:
"
{{
COMMON_EDX_PPA_KEY_ID
}}"
keyserver
:
"
{{
COMMON_EDX_PPA_KEY_SERVER
}}"
state
:
"
present"
when
:
>
ansible_distribution in common_debian_variants and
ansible_distribution_release in common_custom_ppa_releases
ansible_distribution in common_debian_variants
-
name
:
Add custom edX PPA
# Ensure that we get a current version of Git and latest version of python 2.7
# GitHub requires version 1.7.10 or later
# https://help.github.com/articles/https-cloning-errors
# Ensure that we get the latest version of python 2.7
# MySQL 5.6 is from our own PPA: https://bugs.mysql.com/bug.php?id=84848
apt_repository
:
repo
:
"
{{
COMMON_EDX_PPA
}}"
when
:
>
ansible_distribution in common_debian_variants and
ansible_distribution_release in common_custom_ppa_releases
ansible_distribution in common_debian_variants
-
name
:
Install role-independent useful system packages
...
...
@@ -78,7 +75,7 @@
apt
:
name
:
"
{{
item
}}"
install_recommends
:
yes
state
:
present
state
:
present
update_cache
:
yes
with_items
:
"
{{
common_debian_pkgs
}}"
when
:
ansible_distribution in common_debian_variants
...
...
@@ -89,15 +86,15 @@
install_recommends
:
yes
state
:
present
update_cache
:
yes
with_items
:
"
{{
common_custom
_debian_pkgs
}}"
with_items
:
"
{{
old_python
_debian_pkgs
}}"
when
:
>
ansible_distribution in common_debian_variants and
ansible_distribution_release in
common_custom
_ppa_releases
ansible_distribution in common_debian_variants and
ansible_distribution_release in
old_python
_ppa_releases
-
name
:
Install role-independent useful system packages
yum
:
name
:
"
{{
item
}}"
state
:
present
state
:
present
update_cache
:
yes
with_items
:
"
{{
common_redhat_pkgs
}}"
when
:
ansible_distribution in common_redhat_variants
...
...
@@ -106,24 +103,24 @@
-
name
:
Create common directories
file
:
path
:
"
{{
item.path
}}"
state
:
"
{{
item.state
|
default('directory')
}}"
state
:
"
{{
item.state
|
default('directory')
}}"
owner
:
"
{{
item.owner
|
default('root')
}}"
group
:
"
{{
item.group
|
default('root')
}}"
group
:
"
{{
item.group
|
default('root')
}}"
mode
:
"
0755"
with_items
:
"
{{
common_directories
}}"
-
name
:
upload sudo config for key forwarding as root
copy
:
src
:
ssh_key_forward
src
:
ssh_key_forward
dest
:
/etc/sudoers.d/ssh_key_forward
validate
:
'
visudo
-c
-f
%s'
owner
:
root
group
:
root
validate
:
'
visudo
-c
-f
%s'
owner
:
root
group
:
root
mode
:
"
0440"
-
name
:
pip install virtualenv
pip
:
name
:
"
{{
item
}}"
name
:
"
{{
item
}}"
state
:
present
extra_args
:
"
-i
{{
COMMON_PYPI_MIRROR_URL
}}"
with_items
:
"
{{
common_pip_pkgs
}}"
...
...
@@ -131,8 +128,8 @@
-
name
:
update /etc/hosts
template
:
src
:
hosts.j2
template
:
src
:
hosts.j2
dest
:
/etc/hosts
when
:
COMMON_HOSTNAME|length > 0
register
:
etc_hosts
...
...
@@ -152,8 +149,8 @@
template
:
dest
:
"
{{
item.dest
}}"
src
:
"
{{
item.src
}}"
owner
:
root
group
:
root
owner
:
root
group
:
root
mode
:
"
{{
item.mode
|
default(0644)
}}"
register
:
config_templates
with_items
:
...
...
@@ -165,8 +162,8 @@
# TODO: restarts no matter which template has changed, need to examine
# the results
-
name
:
restart rsyslogd
service
:
name
:
rsyslog
service
:
name
:
rsyslog
state
:
restarted
become
:
True
when
:
config_templates.changed
...
...
This diff is collapsed.
Click to expand it.
playbooks/roles/common_vars/defaults/main.yml
View file @
b8ed4f49
...
...
@@ -119,7 +119,7 @@ common_debian_pkgs:
-
python2.7-dev
# Packages that should be installed from our custom PPA, i.e. COMMON_EDX_PPA
common_custom
_debian_pkgs
:
old_python
_debian_pkgs
:
-
"
python2.7=2.7.10-0+{{
ansible_distribution_release
}}1"
common_pip_pkgs
:
...
...
@@ -153,8 +153,8 @@ common_debian_variants:
-
Ubuntu
-
Debian
#
Only attempt to use our custom PPA for these releases
common_custom
_ppa_releases
:
#
We only have to install old Python for these releases:
old_python
_ppa_releases
:
-
precise
-
trusty
...
...
This diff is collapsed.
Click to expand it.
util/install/ansible-bootstrap.sh
View file @
b8ed4f49
...
...
@@ -107,13 +107,9 @@ apt-get install -y software-properties-common python-software-properties
# Add git PPA
add-apt-repository
-y
ppa:git-core/ppa
# For older distributions we need to install a PPA for Python 2.7.10
if
[[
"precise"
=
"
${
SHORT_DIST
}
"
||
"trusty"
=
"
${
SHORT_DIST
}
"
]]
;
then
# Add python PPA
apt-key adv
--keyserver
"
${
EDX_PPA_KEY_SERVER
}
"
--recv-keys
"
${
EDX_PPA_KEY_ID
}
"
add-apt-repository
-y
"
${
EDX_PPA
}
"
fi
# For older software we need to install our own PPA.
apt-key adv
--keyserver
"
${
EDX_PPA_KEY_SERVER
}
"
--recv-keys
"
${
EDX_PPA_KEY_ID
}
"
add-apt-repository
-y
"
${
EDX_PPA
}
"
# Install python 2.7 latest, git and other common requirements
# NOTE: This will install the latest version of python 2.7 and
...
...
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