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
01845083
Commit
01845083
authored
May 14, 2013
by
Jason Bau
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #65 from edx/feature/jrbl/tagging_update_install
Feature/jrbl/tagging update install
parents
0178d755
32fb82af
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
109 additions
and
2 deletions
+109
-2
playbooks/roles/cms/tasks/main.yml
+3
-0
playbooks/roles/common/tasks/create_users.yml
+7
-0
playbooks/roles/common/tasks/create_venv.yml
+9
-0
playbooks/roles/common/tasks/edx_logging_base.yml
+5
-0
playbooks/roles/common/tasks/main.yml
+10
-0
playbooks/roles/common/tasks/software_update.yml
+1
-0
playbooks/roles/gunicorn/tasks/main.yml
+1
-0
playbooks/roles/gunicorn/tasks/upstart.yml
+1
-0
playbooks/roles/in_production/tasks/main.yml
+20
-0
playbooks/roles/lms/tasks/main.yml
+21
-2
playbooks/roles/nginx/tasks/main.yml
+8
-0
playbooks/roles/nginx/tasks/nginx_site.yml
+2
-0
playbooks/roles/npm/tasks/main.yml
+2
-0
playbooks/roles/ruby/tasks/main.yml
+19
-0
No files found.
playbooks/roles/cms/tasks/main.yml
View file @
01845083
...
@@ -8,12 +8,14 @@
...
@@ -8,12 +8,14 @@
tags
:
tags
:
-
cms-env
-
cms-env
-
cms
-
cms
-
update
-
name
:
create cms auth file
-
name
:
create cms auth file
template
:
src=auth.json.j2 dest=$app_base_dir/cms.auth.json mode=640 owner=www-data group=adm
template
:
src=auth.json.j2 dest=$app_base_dir/cms.auth.json mode=640 owner=www-data group=adm
tags
:
tags
:
-
cms-env
-
cms-env
-
cms
-
cms
-
update
-
include
:
../../nginx/tasks/nginx_site.yml state=link site_name=cms
-
include
:
../../nginx/tasks/nginx_site.yml state=link site_name=cms
...
@@ -25,6 +27,7 @@
...
@@ -25,6 +27,7 @@
-
cms
-
cms
-
cms-env
-
cms-env
-
logging
-
logging
-
update
# If we set up CMS, we have to set up edx logging
# If we set up CMS, we have to set up edx logging
-
include
:
../../common/tasks/edx_logging_base.yml
-
include
:
../../common/tasks/edx_logging_base.yml
...
...
playbooks/roles/common/tasks/create_users.yml
View file @
01845083
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
tags
:
tags
:
-
users
-
users
-
admin_users
-
admin_users
-
update
-
name
:
Add user 'ubuntu' to 'edx' group
-
name
:
Add user 'ubuntu' to 'edx' group
# This is a temporary measure for initial configuration; after the last
# This is a temporary measure for initial configuration; after the last
...
@@ -12,6 +13,7 @@
...
@@ -12,6 +13,7 @@
tags
:
tags
:
-
users
-
users
-
admin_users
-
admin_users
-
update
-
name
:
Creating admin users
-
name
:
Creating admin users
# Admin users, by definition, should be able to sudo w/ password, and read adm-only files
# Admin users, by definition, should be able to sudo w/ password, and read adm-only files
...
@@ -21,6 +23,7 @@
...
@@ -21,6 +23,7 @@
tags
:
tags
:
-
users
-
users
-
admin_users
-
admin_users
-
update
-
name
:
Copying ssh keys for admin users
-
name
:
Copying ssh keys for admin users
authorized_key
:
user={{ item.user }} key="{{lookup('file', item.path)}}"
authorized_key
:
user={{ item.user }} key="{{lookup('file', item.path)}}"
...
@@ -28,6 +31,7 @@
...
@@ -28,6 +31,7 @@
tags
:
tags
:
-
users
-
users
-
admin_users
-
admin_users
-
update
-
name
:
Creating env users
-
name
:
Creating env users
user
:
name={{ item.user }} groups={{ ",".join(item.groups) }} shell=/bin/bash
user
:
name={{ item.user }} groups={{ ",".join(item.groups) }} shell=/bin/bash
...
@@ -35,6 +39,7 @@
...
@@ -35,6 +39,7 @@
when
:
env_users is defined
when
:
env_users is defined
tags
:
tags
:
-
users
-
users
-
update
-
name
:
Copying ssh keys for env users
-
name
:
Copying ssh keys for env users
authorized_key
:
user={{ item.user }} key="{{lookup('file', item.path)}}"
authorized_key
:
user={{ item.user }} key="{{lookup('file', item.path)}}"
...
@@ -42,10 +47,12 @@
...
@@ -42,10 +47,12 @@
when
:
env_keys is defined
when
:
env_keys is defined
tags
:
tags
:
-
users
-
users
-
update
-
name
:
Group adm passwordless sudo
-
name
:
Group adm passwordless sudo
copy
:
content="%adm ALL=(ALL) NOPASSWD:ALL" dest=/etc/sudoers.d/adm-group owner=root group=root mode=0440
copy
:
content="%adm ALL=(ALL) NOPASSWD:ALL" dest=/etc/sudoers.d/adm-group owner=root group=root mode=0440
tags
:
tags
:
-
users
-
users
-
admin_users
-
admin_users
-
update
playbooks/roles/common/tasks/create_venv.yml
View file @
01845083
...
@@ -4,19 +4,28 @@
...
@@ -4,19 +4,28 @@
easy_install
:
name=pip
easy_install
:
name=pip
tags
:
tags
:
-
venv_base
-
venv_base
-
install
-
name
:
pip install virtualenv
-
name
:
pip install virtualenv
pip
:
name=virtualenv state=latest
pip
:
name=virtualenv state=latest
tags
:
tags
:
-
venv_base
-
venv_base
-
install
-
name
:
pip install virtualenvwrapper
-
name
:
pip install virtualenvwrapper
pip
:
name=virtualenvwrapper state=latest
pip
:
name=virtualenvwrapper state=latest
tags
:
tags
:
-
venv_base
-
venv_base
-
install
-
name
:
create edx virtualenv directory
-
name
:
create edx virtualenv directory
file
:
path=$venv_dir owner=ubuntu group=adm mode=2775 state=directory
file
:
path=$venv_dir owner=ubuntu group=adm mode=2775 state=directory
tags
:
tags
:
-
venv_base
-
venv_base
-
install
-
name
:
create the edx virtualenv directory initial contents
-
name
:
create the edx virtualenv directory initial contents
command
:
/usr/local/bin/virtualenv $venv_dir creates=$venv_dir/bin/activate
command
:
/usr/local/bin/virtualenv $venv_dir creates=$venv_dir/bin/activate
tags
:
tags
:
-
venv_base
-
venv_base
-
install
playbooks/roles/common/tasks/edx_logging_base.yml
View file @
01845083
...
@@ -4,23 +4,28 @@
...
@@ -4,23 +4,28 @@
notify
:
restart rsyslogd
notify
:
restart rsyslogd
tags
:
tags
:
-
logging
-
logging
-
update
-
name
:
Install logrotate configuration for edX
-
name
:
Install logrotate configuration for edX
template
:
dest=/etc/logrotate.d/edx-services src=edx_logrotate.j2 owner=root group=root mode=644
template
:
dest=/etc/logrotate.d/edx-services src=edx_logrotate.j2 owner=root group=root mode=644
tags
:
tags
:
-
logging
-
logging
-
update
-
name
:
Touch tracking file into existence
-
name
:
Touch tracking file into existence
command
:
touch -a {{log_base_dir}}/tracking.log creates={{log_base_dir}}/tracking.log
command
:
touch -a {{log_base_dir}}/tracking.log creates={{log_base_dir}}/tracking.log
tags
:
tags
:
-
logging
-
logging
-
update
-
name
:
Set permissions on tracking file
-
name
:
Set permissions on tracking file
file
:
path={{log_base_dir}}/tracking.log owner=syslog group=adm mode=640
file
:
path={{log_base_dir}}/tracking.log owner=syslog group=adm mode=640
tags
:
tags
:
-
logging
-
logging
-
update
-
name
:
Install logrotate configuration for tracking file
-
name
:
Install logrotate configuration for tracking file
template
:
dest=/etc/logrotate.d/tracking.log src=edx_logrotate_tracking_log.j2 owner=root group=root mode=644
template
:
dest=/etc/logrotate.d/tracking.log src=edx_logrotate_tracking_log.j2 owner=root group=root mode=644
tags
:
tags
:
-
logging
-
logging
-
update
playbooks/roles/common/tasks/main.yml
View file @
01845083
---
---
-
include
:
create_users.yml
-
include
:
create_users.yml
-
name
:
Create application root
-
name
:
Create application root
# In the future consider making group edx r/t adm
# In the future consider making group edx r/t adm
file
:
path=$app_base_dir state=directory owner=root group=adm mode=2775
file
:
path=$app_base_dir state=directory owner=root group=adm mode=2775
tags
:
tags
:
-
pre_install
-
pre_install
-
update
-
name
:
Create upload directory
-
name
:
Create upload directory
file
:
path=$app_base_dir/uploads mode=2775 state=directory owner=root group=adm
file
:
path=$app_base_dir/uploads mode=2775 state=directory owner=root group=adm
tags
:
tags
:
-
pre_install
-
pre_install
-
update
-
name
:
Create data dir
-
name
:
Create data dir
file
:
path={{ app_base_dir }}/data state=directory owner=root group=root
file
:
path={{ app_base_dir }}/data state=directory owner=root group=root
tags
:
tags
:
-
pre_install
-
pre_install
-
update
-
name
:
Install role-independent useful system packages
-
name
:
Install role-independent useful system packages
# do this before log dir setup; rsyslog package guarantees syslog user present
# do this before log dir setup; rsyslog package guarantees syslog user present
...
@@ -29,23 +33,27 @@
...
@@ -29,23 +33,27 @@
-
tree
-
tree
tags
:
tags
:
-
pre_install
-
pre_install
-
update
-
name
:
Create log directory
-
name
:
Create log directory
file
:
path=$log_base_dir state=directory mode=2770 group=adm owner=syslog
file
:
path=$log_base_dir state=directory mode=2770 group=adm owner=syslog
tags
:
tags
:
-
pre_install
-
pre_install
-
update
-
name
:
Create alias from app_base_dir to the log_base_dir
-
name
:
Create alias from app_base_dir to the log_base_dir
file
:
state=link src=$log_base_dir path=$app_base_dir/log
file
:
state=link src=$log_base_dir path=$app_base_dir/log
tags
:
tags
:
-
pre_install
-
pre_install
-
logging
-
logging
-
update
-
name
:
Create convenience link from log_base_dir to system logs
-
name
:
Create convenience link from log_base_dir to system logs
file
:
state=link src=/var/log path=$log_base_dir/system
file
:
state=link src=/var/log path=$log_base_dir/system
tags
:
tags
:
-
pre_install
-
pre_install
-
logging
-
logging
-
update
-
name
:
Touch edx log file into place
-
name
:
Touch edx log file into place
# This is done for the benefit of the rake commands, which expect it
# This is done for the benefit of the rake commands, which expect it
...
@@ -53,6 +61,7 @@
...
@@ -53,6 +61,7 @@
tags
:
tags
:
-
pre_install
-
pre_install
-
logging
-
logging
-
install
-
name
:
Set permissions on edx log file
-
name
:
Set permissions on edx log file
# This is done for the benefit of the rake commands, which expect it
# This is done for the benefit of the rake commands, which expect it
...
@@ -60,6 +69,7 @@
...
@@ -60,6 +69,7 @@
tags
:
tags
:
-
pre_install
-
pre_install
-
logging
-
logging
-
update
-
include
:
create_venv.yml
-
include
:
create_venv.yml
-
include
:
edx_logging_base.yml
-
include
:
edx_logging_base.yml
...
...
playbooks/roles/common/tasks/software_update.yml
View file @
01845083
...
@@ -2,4 +2,5 @@
...
@@ -2,4 +2,5 @@
-
name
:
edx-update.sh, manual lms/cms update script
-
name
:
edx-update.sh, manual lms/cms update script
copy
:
src=roles/common/files/edx-update.sh dest=/usr/local/bin/edx-update.sh owner=ubuntu group=adm mode=0775
copy
:
src=roles/common/files/edx-update.sh dest=/usr/local/bin/edx-update.sh owner=ubuntu group=adm mode=0775
tags
:
tags
:
-
release
-
update
-
update
playbooks/roles/gunicorn/tasks/main.yml
View file @
01845083
...
@@ -3,3 +3,4 @@
...
@@ -3,3 +3,4 @@
pip
:
name=gunicorn virtualenv="{{venv_dir}}" state=present
pip
:
name=gunicorn virtualenv="{{venv_dir}}" state=present
tags
:
tags
:
-
gunicorn
-
gunicorn
-
install
playbooks/roles/gunicorn/tasks/upstart.yml
View file @
01845083
...
@@ -10,3 +10,4 @@
...
@@ -10,3 +10,4 @@
tags
:
tags
:
-
upstart
-
upstart
-
gunicorn
-
gunicorn
-
update
playbooks/roles/in_production/tasks/main.yml
View file @
01845083
...
@@ -9,10 +9,30 @@
...
@@ -9,10 +9,30 @@
-
name
:
Make sure LMS is running
-
name
:
Make sure LMS is running
service
:
name=lms state=started
service
:
name=lms state=started
tags
:
tags
:
-
lms
-
lms-env
-
production
-
production
-
update
-
name
:
Make sure CMS is running
service
:
name=cms state=started
tags
:
-
cms
-
cms-env
-
production
-
update
-
name
:
Make sure LMS-preview is running
service
:
name=lms-preview state=started
tags
:
-
lms-preview
-
lms-preview-env
-
production
-
update
-
name
:
Disable HTTP Basic Auth on site
-
name
:
Disable HTTP Basic Auth on site
file
:
path=/etc/nginx/sites-enabled/basic-auth state=absent
file
:
path=/etc/nginx/sites-enabled/basic-auth state=absent
notify
:
restart nginx
notify
:
restart nginx
tags
:
tags
:
-
production
-
production
-
update
playbooks/roles/lms/tasks/main.yml
View file @
01845083
...
@@ -8,12 +8,14 @@
...
@@ -8,12 +8,14 @@
tags
:
tags
:
-
lms
-
lms
-
lms-env
-
lms-env
-
update
-
name
:
create lms auth file
-
name
:
create lms auth file
template
:
src=auth.json.j2 dest=$app_base_dir/lms.auth.json mode=640 owner=www-data group=adm
template
:
src=auth.json.j2 dest=$app_base_dir/lms.auth.json mode=640 owner=www-data group=adm
tags
:
tags
:
-
lms
-
lms
-
lms-env
-
lms-env
-
update
-
include
:
../../nginx/tasks/nginx_site.yml state=link site_name=lms
-
include
:
../../nginx/tasks/nginx_site.yml state=link site_name=lms
-
include
:
../../nginx/tasks/nginx_site.yml state=link site_name=lms-backend
-
include
:
../../nginx/tasks/nginx_site.yml state=link site_name=lms-backend
...
@@ -24,6 +26,7 @@
...
@@ -24,6 +26,7 @@
-
cms
-
cms
-
lms
-
lms
-
lms-env
-
lms-env
-
update
-
name
:
Create lms log target directory
-
name
:
Create lms log target directory
file
:
path={{log_base_dir}}/lms state=directory owner=syslog group=adm mode=2770
file
:
path={{log_base_dir}}/lms state=directory owner=syslog group=adm mode=2770
...
@@ -31,6 +34,7 @@
...
@@ -31,6 +34,7 @@
-
lms
-
lms
-
lms-env
-
lms-env
-
logging
-
logging
-
update
# If we set up LMS, we have to set up edx logging
# If we set up LMS, we have to set up edx logging
-
include
:
../../common/tasks/edx_logging_base.yml
-
include
:
../../common/tasks/edx_logging_base.yml
...
@@ -45,12 +49,14 @@
...
@@ -45,12 +49,14 @@
tags
:
tags
:
-
lms
-
lms
-
cms
-
cms
-
update
-
name
:
upload ssh script
-
name
:
upload ssh script
copy
:
src=git_ssh.sh dest=/tmp/git_ssh.sh force=yes owner=root group=adm mode=750
copy
:
src=git_ssh.sh dest=/tmp/git_ssh.sh force=yes owner=root group=adm mode=750
tags
:
tags
:
-
lms
-
lms
-
cms
-
cms
-
update
# Check out mitx repo to $app_base_dir
# Check out mitx repo to $app_base_dir
-
name
:
install git and its recommends
-
name
:
install git and its recommends
...
@@ -58,13 +64,15 @@
...
@@ -58,13 +64,15 @@
tags
:
tags
:
-
lms
-
lms
-
cms
-
cms
-
name
:
git checkout mitx repo into $app_base_dir
git
:
dest={{app_base_dir}}/mitx repo={{lms_source_repo}}
-
name
:
git checkout edx-platform repo into $app_base_dir
git
:
dest={{platform_code_dir}} repo={{lms_source_repo}}
environment
:
environment
:
GIT_SSH
:
/tmp/git_ssh.sh
GIT_SSH
:
/tmp/git_ssh.sh
tags
:
tags
:
-
lms
-
lms
-
cms
-
cms
-
install
## Install the debian package requirements system-wide
## Install the debian package requirements system-wide
-
name
:
store remote apt_repos list for ansible use
-
name
:
store remote apt_repos list for ansible use
...
@@ -73,6 +81,8 @@
...
@@ -73,6 +81,8 @@
tags
:
tags
:
-
lms
-
lms
-
cms
-
cms
-
install
-
name
:
add apt_repos to the remote hosts
-
name
:
add apt_repos to the remote hosts
apt_repository
:
repo="$item"
apt_repository
:
repo="$item"
with_items
:
"
{{apt_repos_list.stdout.split()}}"
with_items
:
"
{{apt_repos_list.stdout.split()}}"
...
@@ -81,6 +91,8 @@
...
@@ -81,6 +91,8 @@
tags
:
tags
:
-
lms
-
lms
-
cms
-
cms
-
install
-
name
:
update apt cache (if necessary)
-
name
:
update apt cache (if necessary)
apt
:
update_cache=yes
apt
:
update_cache=yes
sudo
:
True
sudo
:
True
...
@@ -88,18 +100,23 @@
...
@@ -88,18 +100,23 @@
tags
:
tags
:
-
lms
-
lms
-
cms
-
cms
-
install
-
name
:
store remote apt_packages list for ansible use
-
name
:
store remote apt_packages list for ansible use
command
:
cat {{app_base_dir}}/mitx/apt-packages.txt
command
:
cat {{app_base_dir}}/mitx/apt-packages.txt
register
:
apt_packages_list
register
:
apt_packages_list
tags
:
tags
:
-
lms
-
lms
-
cms
-
cms
-
install
-
name
:
install a bunch of system packages on which LMS and CMS rely
-
name
:
install a bunch of system packages on which LMS and CMS rely
apt
:
pkg={{item}} state=present
apt
:
pkg={{item}} state=present
with_items
:
lms_debian_pkgs
with_items
:
lms_debian_pkgs
tags
:
tags
:
-
lms
-
lms
-
cms
-
cms
-
install
# Install the python requirements into $venv_dir
# Install the python requirements into $venv_dir
-
name
:
install python pre-requirements
-
name
:
install python pre-requirements
...
@@ -107,6 +124,7 @@
...
@@ -107,6 +124,7 @@
tags
:
tags
:
-
lms
-
lms
-
cms
-
cms
-
install
# Install the python modules into $venv_dir
# Install the python modules into $venv_dir
-
name
:
install python packages using the shell
-
name
:
install python packages using the shell
...
@@ -118,6 +136,7 @@
...
@@ -118,6 +136,7 @@
tags
:
tags
:
-
lms
-
lms
-
cms
-
cms
-
install
# Creates LMS upstart file
# Creates LMS upstart file
-
include
:
../../gunicorn/tasks/upstart.yml service_variant=lms
-
include
:
../../gunicorn/tasks/upstart.yml service_variant=lms
playbooks/roles/nginx/tasks/main.yml
View file @
01845083
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
notify
:
restart nginx
notify
:
restart nginx
tags
:
tags
:
-
nginx
-
nginx
-
install
# Standard configuration that is common across all roles
# Standard configuration that is common across all roles
# Default values for these variables are set in group_vars/all
# Default values for these variables are set in group_vars/all
...
@@ -17,12 +18,14 @@
...
@@ -17,12 +18,14 @@
copy
:
content={{ nginx_cfg.htpasswd }} dest=/etc/nginx/nginx.htpasswd
copy
:
content={{ nginx_cfg.htpasswd }} dest=/etc/nginx/nginx.htpasswd
tags
:
tags
:
-
nginx
-
nginx
-
update
-
name
:
Create nginx log file location (just in case)
-
name
:
Create nginx log file location (just in case)
file
:
path={{log_base_dir}}/nginx state=directory owner=syslog group=adm mode=2770
file
:
path={{log_base_dir}}/nginx state=directory owner=syslog group=adm mode=2770
tags
:
tags
:
-
nginx
-
nginx
-
logging
-
logging
-
update
# removing default link
# removing default link
-
name
:
Removing default nginx config and restart (enabled)
-
name
:
Removing default nginx config and restart (enabled)
...
@@ -30,11 +33,13 @@
...
@@ -30,11 +33,13 @@
notify
:
restart nginx
notify
:
restart nginx
tags
:
tags
:
-
nginx
-
nginx
-
update
-
name
:
Ensuring that nginx is running
-
name
:
Ensuring that nginx is running
service
:
name=nginx state=started
service
:
name=nginx state=started
tags
:
tags
:
-
nginx
-
nginx
-
update
# Note that nginx logs to /var/log until it reads its configuration, so /etc/logrotate.d/nginx is still good
# Note that nginx logs to /var/log until it reads its configuration, so /etc/logrotate.d/nginx is still good
...
@@ -42,14 +47,17 @@
...
@@ -42,14 +47,17 @@
template
:
dest=/etc/logrotate.d/nginx-access src=edx_logrotate_nginx_access.j2 owner=root group=root mode=644
template
:
dest=/etc/logrotate.d/nginx-access src=edx_logrotate_nginx_access.j2 owner=root group=root mode=644
tags
:
tags
:
-
logging
-
logging
-
update
-
name
:
Set up nginx access log rotation
-
name
:
Set up nginx access log rotation
template
:
dest=/etc/logrotate.d/nginx-error src=edx_logrotate_nginx_error.j2 owner=root group=root mode=644
template
:
dest=/etc/logrotate.d/nginx-error src=edx_logrotate_nginx_error.j2 owner=root group=root mode=644
tags
:
tags
:
-
logging
-
logging
-
update
-
name
:
Removing default nginx config (available)
-
name
:
Removing default nginx config (available)
file
:
path=/etc/nginx/sites-available/default state=absent
file
:
path=/etc/nginx/sites-available/default state=absent
tags
:
tags
:
-
nginx
-
nginx
-
update
playbooks/roles/nginx/tasks/nginx_site.yml
View file @
01845083
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
-
lms
-
lms
-
cms
-
cms
-
nginx-env
-
nginx-env
-
update
-
name
:
Creating nginx config link {{ site_name }}
-
name
:
Creating nginx config link {{ site_name }}
file
:
src=/etc/nginx/sites-available/{{ site_name }} dest=/etc/nginx/sites-enabled/{{ site_name }} state={{ state }} owner=root group=root
file
:
src=/etc/nginx/sites-available/{{ site_name }} dest=/etc/nginx/sites-enabled/{{ site_name }} state={{ state }} owner=root group=root
...
@@ -21,3 +22,4 @@
...
@@ -21,3 +22,4 @@
-
lms
-
lms
-
cms
-
cms
-
nginx-env
-
nginx-env
-
update
playbooks/roles/npm/tasks/main.yml
View file @
01845083
...
@@ -6,9 +6,11 @@
...
@@ -6,9 +6,11 @@
apt
:
pkg=nodejs state=present install_recommends=no
apt
:
pkg=nodejs state=present install_recommends=no
tags
:
tags
:
-
npm
-
npm
-
install
-
name
:
Install mitx npm dependencies
-
name
:
Install mitx npm dependencies
shell
:
npm install chdir=${app_base_dir}/mitx
shell
:
npm install chdir=${app_base_dir}/mitx
tags
:
tags
:
-
npm
-
npm
-
update
playbooks/roles/ruby/tasks/main.yml
View file @
01845083
...
@@ -4,10 +4,14 @@
...
@@ -4,10 +4,14 @@
user
:
name=www state=present
user
:
name=www state=present
tags
:
tags
:
-
ruby
-
ruby
-
update
-
name
:
Create ruby base
-
name
:
Create ruby base
file
:
path=$ruby_base state=directory owner=www group=www
file
:
path=$ruby_base state=directory owner=www group=www
tags
:
tags
:
-
ruby
-
ruby
-
update
-
name
:
rbenv | install build depends
-
name
:
rbenv | install build depends
apt
:
pkg=$item state=present install_recommends=no
apt
:
pkg=$item state=present install_recommends=no
with_items
:
with_items
:
...
@@ -22,21 +26,25 @@
...
@@ -22,21 +26,25 @@
-
zlib1g-dev
-
zlib1g-dev
tags
:
tags
:
-
ruby
-
ruby
-
install
-
name
:
rbenv | update rbenv repo
-
name
:
rbenv | update rbenv repo
git
:
repo=git://github.com/sstephenson/rbenv.git dest=$rbenv_root version=v0.4.0
git
:
repo=git://github.com/sstephenson/rbenv.git dest=$rbenv_root version=v0.4.0
tags
:
tags
:
-
ruby
-
ruby
-
install
-
name
:
rbenv | add rbenv to path
-
name
:
rbenv | add rbenv to path
file
:
path=/usr/local/bin/rbenv src=${rbenv_root}/bin/rbenv state=link
file
:
path=/usr/local/bin/rbenv src=${rbenv_root}/bin/rbenv state=link
tags
:
tags
:
-
ruby
-
ruby
-
update
-
name
:
rbenv | add rbenv initialization to profile
-
name
:
rbenv | add rbenv initialization to profile
template
:
src=rbenv.sh.j2 dest=/etc/profile.d/rbenv.sh owner=root group=root mode=0755
template
:
src=rbenv.sh.j2 dest=/etc/profile.d/rbenv.sh owner=root group=root mode=0755
tags
:
tags
:
-
ruby
-
ruby
-
update
-
name
:
rbenv | check ruby-build installed
-
name
:
rbenv | check ruby-build installed
command
:
test -x /usr/local/bin/ruby-build
command
:
test -x /usr/local/bin/ruby-build
...
@@ -44,6 +52,7 @@
...
@@ -44,6 +52,7 @@
ignore_errors
:
yes
ignore_errors
:
yes
tags
:
tags
:
-
ruby
-
ruby
-
install
-
name
:
rbenv | create temporary directory
-
name
:
rbenv | create temporary directory
command
:
mktemp -d
command
:
mktemp -d
...
@@ -51,24 +60,28 @@
...
@@ -51,24 +60,28 @@
when_failed
:
$rbuild_present
when_failed
:
$rbuild_present
tags
:
tags
:
-
ruby
-
ruby
-
install
-
name
:
rbenv | clone ruby-build repo
-
name
:
rbenv | clone ruby-build repo
git
:
repo=git://github.com/sstephenson/ruby-build.git dest=${tempdir.stdout}/ruby-build
git
:
repo=git://github.com/sstephenson/ruby-build.git dest=${tempdir.stdout}/ruby-build
when_failed
:
$rbuild_present
when_failed
:
$rbuild_present
tags
:
tags
:
-
ruby
-
ruby
-
install
-
name
:
rbenv | install ruby-build
-
name
:
rbenv | install ruby-build
command
:
./install.sh chdir=${tempdir.stdout}/ruby-build
command
:
./install.sh chdir=${tempdir.stdout}/ruby-build
when_failed
:
$rbuild_present
when_failed
:
$rbuild_present
tags
:
tags
:
-
ruby
-
ruby
-
install
-
name
:
rbenv | remove temporary directory
-
name
:
rbenv | remove temporary directory
file
:
path=${tempdir.stdout} state=absent
file
:
path=${tempdir.stdout} state=absent
when_failed
:
$rbuild_present
when_failed
:
$rbuild_present
tags
:
tags
:
-
ruby
-
ruby
-
install
-
name
:
rbenv | check ruby $ruby_version installed
-
name
:
rbenv | check ruby $ruby_version installed
shell
:
RBENV_ROOT=${rbenv_root} rbenv versions | grep $ruby_version
shell
:
RBENV_ROOT=${rbenv_root} rbenv versions | grep $ruby_version
...
@@ -76,31 +89,37 @@
...
@@ -76,31 +89,37 @@
ignore_errors
:
yes
ignore_errors
:
yes
tags
:
tags
:
-
ruby
-
ruby
-
install
-
name
:
rbenv | install ruby $ruby_version
-
name
:
rbenv | install ruby $ruby_version
shell
:
RBENV_ROOT=${rbenv_root} rbenv install $ruby_version
shell
:
RBENV_ROOT=${rbenv_root} rbenv install $ruby_version
when_failed
:
$ruby_installed
when_failed
:
$ruby_installed
tags
:
tags
:
-
ruby
-
ruby
-
install
-
name
:
rbenv | set global ruby $ruby_version
-
name
:
rbenv | set global ruby $ruby_version
shell
:
RBENV_ROOT=${rbenv_root} rbenv global $ruby_version
shell
:
RBENV_ROOT=${rbenv_root} rbenv global $ruby_version
when_failed
:
$ruby_installed
when_failed
:
$ruby_installed
tags
:
tags
:
-
ruby
-
ruby
-
install
-
name
:
rbenv | rehash
-
name
:
rbenv | rehash
shell
:
RBENV_ROOT=${rbenv_root} rbenv rehash
shell
:
RBENV_ROOT=${rbenv_root} rbenv rehash
when_failed
:
$ruby_installed
when_failed
:
$ruby_installed
tags
:
tags
:
-
ruby
-
ruby
-
install
-
name
:
gem | gem install bundler
-
name
:
gem | gem install bundler
shell
:
RBENV_ROOT=${rbenv_root} GEM_HOME=${gem_home} ${rbenv_root}/shims/gem install bundle chdir=${app_base_dir}/mitx
shell
:
RBENV_ROOT=${rbenv_root} GEM_HOME=${gem_home} ${rbenv_root}/shims/gem install bundle chdir=${app_base_dir}/mitx
tags
:
tags
:
-
ruby
-
ruby
-
install
-
name
:
bundle | bundle install
-
name
:
bundle | bundle install
shell
:
RBENV_ROOT=${rbenv_root} GEM_HOME=${gem_home} ${gem_home}/bin/bundle install --binstubs chdir=${app_base_dir}/mitx
shell
:
RBENV_ROOT=${rbenv_root} GEM_HOME=${gem_home} ${gem_home}/bin/bundle install --binstubs chdir=${app_base_dir}/mitx
tags
:
tags
:
-
ruby
-
ruby
-
install
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