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
0a021ca8
Commit
0a021ca8
authored
11 years ago
by
e0d
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactoring for create user task, cleanup
parent
1430d035
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
12 deletions
+18
-12
playbooks/roles/forum/tasks/main.yml
+4
-5
playbooks/roles/rbenv/tasks/main.yml
+14
-7
No files found.
playbooks/roles/forum/tasks/main.yml
View file @
0a021ca8
---
-
name
:
forum | create $forum_user user
user
:
name=$forum_user state=present shell=/bin/bash home=$forum_home
tags
:
-
forum
-
update
#
# This role depends upon the rbenv role which needs to
# be included in the same playbook prior to this role.
#
-
name
:
forum | setup the forum env
template
:
src=forum_env.j2 dest={{ forum_home }}/forum_env owner={{ forum_user }} group={{ forum_user }}
...
...
This diff is collapsed.
Click to expand it.
playbooks/roles/rbenv/tasks/main.yml
View file @
0a021ca8
...
...
@@ -12,11 +12,18 @@
-
fail
:
rbenv_ruby_version required for role
when
:
rbenv_ruby_version is not defined
#- name: rbenv | create ruby base
# file: path=$ruby_base state=directory owner={{ rbenv_user }} group={{ rbenv_user }}
# tags:
# - ruby
# - update
#
# It's unfortunate that this needs to happen here,
# but the rbenv needs to exist when the service
# that relies on it is provisioned and the service
# user and it's home needs to exist for rbenv to
# install into.
#
-
name
:
rbenv | create rbenv owner $forum_user
user
:
name=$forum_user state=present shell=/bin/bash home=$forum_home
tags
:
-
forum
-
update
-
name
:
rbenv | install build depends
apt
:
pkg=$item state=present install_recommends=no
...
...
@@ -111,7 +118,7 @@
-
install
-
name
:
rbenv | check ruby {{ rbenv_ruby_version }} installed
shell
:
${rbenv_user_home}/.rbenv/bin/rbenv versions | grep ${rbenv_ruby_version}
shell
:
"
{{
rbenv_user_home
}}/.rbenv/bin/rbenv
versions
|
grep
{{
rbenv_ruby_version
}}"
register
:
ruby_installed
sudo
:
true
sudo_user
:
"
{{
rbenv_user
}}"
...
...
@@ -121,7 +128,7 @@
-
install
-
name
:
rbenv | install ruby {{ rbenv_ruby_version }}
shell
:
${rbenv_user_home }/.rbenv/bin/rbenv install ${rbenv_ruby_version}
shell
:
"
{{
rbenv_user_home
}}/.rbenv/bin/rbenv
install
{{
rbenv_ruby_version
}}"
when_failed
:
$ruby_installed
sudo
:
true
sudo_user
:
"
{{
rbenv_user
}}"
...
...
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