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
192ce8d6
Commit
192ce8d6
authored
Jun 22, 2016
by
Kevin Falcone
Committed by
GitHub
Jun 22, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3160 from edx/jibsheet/protect-ssh-key-checking
We have users who are absent and keyless
parents
2e24a982
7b8ada51
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
+4
-1
playbooks/roles/user/tasks/main.yml
+4
-1
No files found.
playbooks/roles/user/tasks/main.yml
View file @
192ce8d6
...
...
@@ -116,13 +116,16 @@
-
name
:
Check the ssh key(s) for user(s) over github
uri
:
url
:
"
https://github.com/{{
item.name
}}.keys"
# We don't care if absent users lack ssh keys
when
:
item.get('state', 'present') == 'present'
with_items
:
"
{{
user_info
}}"
register
:
github_users_return
-
fail
:
msg
:
"
User
{{
item.item.name
}}
doesn't
have
an
SSH
key
associated
with
their
account"
with_items
:
"
{{
github_users_return.results
|
default([])
}}"
when
:
item.content_length == "0"
# We skip users in the previous task, and they end up with no content_length
when
:
item.get('content_length') and item.content_length == "0"
-
name
:
Get github key(s) and update the authorized_keys file
authorized_key
:
...
...
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