Commit 8f4a3094 by Sef Kloninger

Merge pull request #742 from edx/sef/gh_users_no_sudo_master

add users without sudo (gh_user_no_sudo)
parents 416ac5c9 fba3f8ea
...@@ -8,3 +8,18 @@ ...@@ -8,3 +8,18 @@
roles: roles:
- common - common
- supervisor - supervisor
- role: gh_users
gh_users:
- sefk
- jbau
- jrbl
- ali123
- caesar2164
- dcadams
- nparlante
gh_users_no_sudo:
- jinpa
- gbruhns
- paepcke
- akshayak
tags: users
...@@ -3,3 +3,4 @@ ...@@ -3,3 +3,4 @@
# update the system bashrc default # update the system bashrc default
GH_USERS_PROMPT: "" GH_USERS_PROMPT: ""
gh_users: [] gh_users: []
gh_users_no_sudo: []
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
# gh_users: # gh_users:
# - joe # - joe
# - mark # - mark
# gh_users_no_sudo:
# - tourist_dave
- name: creating default .bashrc - name: creating default .bashrc
...@@ -27,22 +29,28 @@ ...@@ -27,22 +29,28 @@
dest=/etc/sudoers.d/gh owner=root group=root dest=/etc/sudoers.d/gh owner=root group=root
mode=0440 validate='visudo -cf %s' mode=0440 validate='visudo -cf %s'
- name: create github users - name: create sudo github users
user: user:
name={{ item }} groups=gh name={{ item }} groups=gh
shell=/bin/bash shell=/bin/bash
with_items: gh_users with_items: gh_users
- name: create non-sudo github users
user:
name={{ item }}
shell=/bin/bash
with_items: gh_users_no_sudo
- name: create .ssh directory - name: create .ssh directory
file: file:
path=/home/{{ item }}/.ssh state=directory mode=0700 path=/home/{{ item }}/.ssh state=directory mode=0700
owner={{ item }} owner={{ item }}
with_items: gh_users with_items: gh_users + gh_users_no_sudo
- name: copy github key[s] to .ssh/authorized_keys - name: copy github key[s] to .ssh/authorized_keys
get_url: get_url:
url=https://github.com/{{ item }}.keys url=https://github.com/{{ item }}.keys
dest=/home/{{ item }}/.ssh/authorized_keys mode=0600 dest=/home/{{ item }}/.ssh/authorized_keys mode=0600
owner={{ item }} owner={{ item }}
with_items: gh_users with_items: gh_users + gh_users_no_sudo
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment