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
b9be53c1
Commit
b9be53c1
authored
Oct 08, 2013
by
John Jarvis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding gh_users role
parent
1928b8c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
0 deletions
+40
-0
playbooks/roles/gh_users/tasks/main.yml
+40
-0
No files found.
playbooks/roles/gh_users/tasks/main.yml
0 → 100644
View file @
b9be53c1
---
# gh_users
#
# Creates OS accounts for users based on their github credential.
# Takes a list gh_users as a parameter which is a list of users
#
# roles:
# - role: gh_users
# gh_users:
# - user: github_admin_username
# groups:
# - adm
# - user: another_github_username
# groups: !!null
-
fail
:
gh_users list must be defined for this parameterized role
when
:
not gh_users
-
name
:
gh_users | create local user for github user
user
:
name={{ item.user }}
groups={{ ",".join(item.groups) }}
shell=/bin/bash
with_items
:
gh_users
-
name
:
gh_users | create .ssh directory
file
:
path=/home/{{ item.user }}/.ssh state=directory mode=0700
owner={{ item.user }} group={{ item.user }}
with_items
:
gh_users
-
name
:
gh_users | copy github key[s] to .ssh/authorized_keys
get_url
:
url=https://github.com/{{ item.user }}.keys
dest=/home/{{ item.user }}/.ssh/authorized_keys mode=0600
owner={{ item.user }} group={{ item.user }}
with_items
:
gh_users
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