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
a4e0042f
Commit
a4e0042f
authored
Mar 06, 2014
by
John Jarvis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
renaming user_info to USER_INFO
parent
7cecdd82
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
39 additions
and
27 deletions
+39
-27
playbooks/edx-east/create_all_user_types.yml
+1
-1
playbooks/edx-east/create_user.yml
+2
-2
playbooks/edx-west/prod-jumpbox.yml
+1
-1
playbooks/roles/analytics-server/meta/main.yml
+1
-1
playbooks/roles/bastion/defaults/main.yml
+11
-0
playbooks/roles/bastion/meta/main.yml
+1
-1
playbooks/roles/edxapp/meta/main.yml
+1
-1
playbooks/roles/user/defaults/main.yml
+5
-4
playbooks/roles/user/tasks/main.yml
+14
-14
playbooks/roles/user/templates/restricted.sudoers.conf.j2
+1
-1
util/jenkins/ansible-provision.sh
+1
-1
No files found.
playbooks/edx-east/create_all_user_types.yml
View file @
a4e0042f
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
when
:
user is not defined
when
:
user is not defined
-
name
:
give access with no sudo
-
name
:
give access with no sudo
set_fact
:
set_fact
:
user_info
:
USER_INFO
:
-
name
:
"
{{
user
}}"
-
name
:
"
{{
user
}}"
github
:
true
github
:
true
-
name
:
test-admin-user
-
name
:
test-admin-user
...
...
playbooks/edx-east/create_user.yml
View file @
a4e0042f
...
@@ -12,13 +12,13 @@
...
@@ -12,13 +12,13 @@
when
:
user is not defined
when
:
user is not defined
-
name
:
give access with no sudo
-
name
:
give access with no sudo
set_fact
:
set_fact
:
user_info
:
USER_INFO
:
-
name
:
"
{{
user
}}"
-
name
:
"
{{
user
}}"
github
:
true
github
:
true
when
:
give_sudo is not defined
when
:
give_sudo is not defined
-
name
:
give access with sudo
-
name
:
give access with sudo
set_fact
:
set_fact
:
user_info
:
USER_INFO
:
-
name
:
"
{{
user
}}"
-
name
:
"
{{
user
}}"
type
:
admin
type
:
admin
github
:
true
github
:
true
...
...
playbooks/edx-west/prod-jumpbox.yml
View file @
a4e0042f
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
-
common
-
common
-
supervisor
-
supervisor
-
role
:
user
-
role
:
user
user_data
:
USER_INFO
:
-
name
:
sefk
-
name
:
sefk
github
:
true
github
:
true
type
:
admin
type
:
admin
...
...
playbooks/roles/analytics-server/meta/main.yml
View file @
a4e0042f
---
---
dependencies
:
dependencies
:
-
role
:
user
-
role
:
user
user_info
:
USER_INFO
:
-
name
:
"
{{
AS_AUTOMATOR_NAME
}}"
-
name
:
"
{{
AS_AUTOMATOR_NAME
}}"
type
:
restricted
type
:
restricted
sudo_cmds
:
"
{{
AS_AUTOMATOR_SUDO_CMDS
}}"
sudo_cmds
:
"
{{
AS_AUTOMATOR_SUDO_CMDS
}}"
...
...
playbooks/roles/bastion/defaults/main.yml
View file @
a4e0042f
...
@@ -11,7 +11,18 @@
...
@@ -11,7 +11,18 @@
#
#
# Defaults for role bastion
# Defaults for role bastion
#
#
# These users are given access
# to the databases from the bastion
# box, it needs to be a subset of the
# users created on the box which is
# USER_INFO + BASTION_USER_INFO
BASTION_REPLICA_USERS
:
[]
BASTION_REPLICA_USERS
:
[]
# These users are created on the bastion
# server.
BASTION_USER_INFO
:
[]
#
#
# vars are namespace with the module name.
# vars are namespace with the module name.
#
#
...
...
playbooks/roles/bastion/meta/main.yml
View file @
a4e0042f
...
@@ -12,5 +12,5 @@
...
@@ -12,5 +12,5 @@
#
#
dependencies
:
dependencies
:
-
role
:
user
-
role
:
user
user_info
:
"
{{
bastion_user_info
}}"
USER_INFO
:
"
{{
BASTION_USER_INFO
}}"
-
aws
-
aws
playbooks/roles/edxapp/meta/main.yml
View file @
a4e0042f
...
@@ -7,7 +7,7 @@ dependencies:
...
@@ -7,7 +7,7 @@ dependencies:
rbenv_ruby_version
:
"
{{
edxapp_ruby_version
}}"
rbenv_ruby_version
:
"
{{
edxapp_ruby_version
}}"
-
devpi
-
devpi
-
role
:
user
-
role
:
user
user_info
:
USER_INFO
:
-
name
:
"
{{
EDXAPP_AUTOMATOR_NAME
}}"
-
name
:
"
{{
EDXAPP_AUTOMATOR_NAME
}}"
sudo_cmds
:
"
{{
EDXAPP_AUTOMATOR_SUDO_CMDS
}}"
sudo_cmds
:
"
{{
EDXAPP_AUTOMATOR_SUDO_CMDS
}}"
type
:
restricted
type
:
restricted
...
...
playbooks/roles/user/defaults/main.yml
View file @
a4e0042f
...
@@ -11,15 +11,16 @@
...
@@ -11,15 +11,16 @@
# Vars for role user
# Vars for role user
#
#
# Role parameters
# Override this list
USER_INFO
:
[]
#
#
# vars are namespace with the module name.
# vars are namespace with the module name.
#
#
user_role_name
:
user
user_role_name
:
user
# Role parameters
# Override this list
user_info
:
[]
# override this var to add a prefix to the prompt
# override this var to add a prefix to the prompt
# also need to set commont_update_bashrc for to
# also need to set commont_update_bashrc for to
# update the system bashrc default
# update the system bashrc default
...
...
playbooks/roles/user/tasks/main.yml
View file @
a4e0042f
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
# #
# #
#
#
# - role: user
# - role: user
#
user_info
:
#
USER_INFO
:
# # This restricted user is defined in meta/
# # This restricted user is defined in meta/
# # for edxapp, it creates a user that can only
# # for edxapp, it creates a user that can only
# # run manage.py commands
# # run manage.py commands
...
@@ -69,7 +69,7 @@
...
@@ -69,7 +69,7 @@
# which can be passed in as a paramter to the role.
# which can be passed in as a paramter to the role.
#
#
-
debug
:
var=
user_info
-
debug
:
var=
USER_INFO
-
name
:
create the edxadmin group
-
name
:
create the edxadmin group
group
:
name=edxadmin state=present
group
:
name=edxadmin state=present
...
@@ -85,20 +85,20 @@
...
@@ -85,20 +85,20 @@
user
:
user
:
name={{ item.name }}
name={{ item.name }}
shell=/bin/bash
shell=/bin/bash
with_items
:
user_info
with_items
:
USER_INFO
-
name
:
create .ssh directory
-
name
:
create .ssh directory
file
:
file
:
path=/home/{{ item.name }}/.ssh state=directory mode=0750
path=/home/{{ item.name }}/.ssh state=directory mode=0750
owner={{ item.name }}
owner={{ item.name }}
with_items
:
user_info
with_items
:
USER_INFO
-
name
:
assign admin role to admin users
-
name
:
assign admin role to admin users
user
:
user
:
name={{ item.name }}
name={{ item.name }}
groups=edxadmin
groups=edxadmin
when
:
item.type is defined and item.type == 'admin'
when
:
item.type is defined and item.type == 'admin'
with_items
:
user_info
with_items
:
USER_INFO
# authorized_keys2 used here so that personal
# authorized_keys2 used here so that personal
# keys can be copied to authorized_keys
# keys can be copied to authorized_keys
...
@@ -108,7 +108,7 @@
...
@@ -108,7 +108,7 @@
dest=/home/{{ item.name }}/.ssh/authorized_keys2 mode=0640
dest=/home/{{ item.name }}/.ssh/authorized_keys2 mode=0640
owner={{ item.name }}
owner={{ item.name }}
when
:
item.github is defined
when
:
item.github is defined
with_items
:
user_info
with_items
:
USER_INFO
-
name
:
copy additional authorized keys
-
name
:
copy additional authorized keys
copy
:
>
copy
:
>
...
@@ -117,7 +117,7 @@
...
@@ -117,7 +117,7 @@
owner={{ item.name }}
owner={{ item.name }}
mode=0440
mode=0440
when
:
item.authorized_keys is defined
when
:
item.authorized_keys is defined
with_items
:
user_info
with_items
:
USER_INFO
-
name
:
create bashrc file for normal users
-
name
:
create bashrc file for normal users
template
:
>
template
:
>
...
@@ -125,14 +125,14 @@
...
@@ -125,14 +125,14 @@
dest=/home/{{ item.name }}/.bashrc mode=0640
dest=/home/{{ item.name }}/.bashrc mode=0640
owner={{ item.name }}
owner={{ item.name }}
when
:
not (item.type is defined and item.type == 'restricted')
when
:
not (item.type is defined and item.type == 'restricted')
with_items
:
user_info
with_items
:
USER_INFO
-
name
:
create .profile for all users
-
name
:
create .profile for all users
template
:
>
template
:
>
src=default.profile.j2
src=default.profile.j2
dest=/home/{{ item.name }}/.profile mode=0640
dest=/home/{{ item.name }}/.profile mode=0640
owner={{ item.name }}
owner={{ item.name }}
with_items
:
user_info
with_items
:
USER_INFO
########################################################
########################################################
# All tasks below this line are for restricted users
# All tasks below this line are for restricted users
...
@@ -142,7 +142,7 @@
...
@@ -142,7 +142,7 @@
name={{ item.name }}
name={{ item.name }}
shell=/bin/rbash
shell=/bin/rbash
when
:
item.type is defined and item.type == 'restricted'
when
:
item.type is defined and item.type == 'restricted'
with_items
:
user_info
with_items
:
USER_INFO
-
name
:
create bashrc file for restricted users
-
name
:
create bashrc file for restricted users
template
:
>
template
:
>
...
@@ -150,7 +150,7 @@
...
@@ -150,7 +150,7 @@
dest=/home/{{ item.name }}/.bashrc mode=0640
dest=/home/{{ item.name }}/.bashrc mode=0640
owner={{ item.name }}
owner={{ item.name }}
when
:
item.type is defined and item.type == 'restricted'
when
:
item.type is defined and item.type == 'restricted'
with_items
:
user_info
with_items
:
USER_INFO
-
name
:
create sudoers file from template
-
name
:
create sudoers file from template
template
:
template
:
...
@@ -164,14 +164,14 @@
...
@@ -164,14 +164,14 @@
-
name
:
change home directory ownership to root for restricted users
-
name
:
change home directory ownership to root for restricted users
shell
:
"
chown
-R
root:{{
item.name
}}
/home/{{
item.name
}}"
shell
:
"
chown
-R
root:{{
item.name
}}
/home/{{
item.name
}}"
when
:
item.type is defined and item.type == 'restricted'
when
:
item.type is defined and item.type == 'restricted'
with_items
:
user_info
with_items
:
USER_INFO
-
name
:
create ~/bin directory
-
name
:
create ~/bin directory
file
:
file
:
path=/home/{{ item.name }}/bin state=directory mode=0750
path=/home/{{ item.name }}/bin state=directory mode=0750
owner="root" group={{ item.name }}
owner="root" group={{ item.name }}
when
:
item.type is defined and item.type == 'restricted'
when
:
item.type is defined and item.type == 'restricted'
with_items
:
user_info
with_items
:
USER_INFO
-
name
:
create allowed command links
-
name
:
create allowed command links
file
:
file
:
...
@@ -180,5 +180,5 @@
...
@@ -180,5 +180,5 @@
state
:
link
state
:
link
when
:
item[0].type is defined and item[0].type == 'restricted'
when
:
item[0].type is defined and item[0].type == 'restricted'
with_nested
:
with_nested
:
-
user_info
-
USER_INFO
-
user_rbash_links
-
user_rbash_links
playbooks/roles/user/templates/restricted.sudoers.conf.j2
View file @
a4e0042f
{% for user in
user_info
-%}
{% for user in
USER_INFO
-%}
{% if 'sudo_cmds' in user -%}
{% if 'sudo_cmds' in user -%}
{% for cmd in user['sudo_cmds'] -%}
{% for cmd in user['sudo_cmds'] -%}
{{ user['name'] }} {{ cmd }}
{{ user['name'] }} {{ cmd }}
...
...
util/jenkins/ansible-provision.sh
View file @
a4e0042f
...
@@ -172,7 +172,7 @@ instance_tags:
...
@@ -172,7 +172,7 @@ instance_tags:
owner:
$BUILD_USER
owner:
$BUILD_USER
root_ebs_size:
$root_ebs_size
root_ebs_size:
$root_ebs_size
name_tag:
$name_tag
name_tag:
$name_tag
user_info
:
USER_INFO
:
- name:
${
github_username
}
- name:
${
github_username
}
github: true
github: true
type: admin
type: admin
...
...
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