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
1dc5a027
Commit
1dc5a027
authored
8 years ago
by
Brian Beggs
Committed by
GitHub
8 years ago
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3315 from edx/bbeggs/TE-1633
Adding task to install github private RSA key in go-server
parents
c70880d1
fbe8e09b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
playbooks/roles/go-server/tasks/main.yml
+35
-0
No files found.
playbooks/roles/go-server/tasks/main.yml
View file @
1dc5a027
...
@@ -126,6 +126,41 @@
...
@@ -126,6 +126,41 @@
-
{
username
:
GO_SERVER_GOMATIC_USERNAME
,
password
:
GO_SERVER_GOMATIC_PASSWORD
,
password_hash
:
gomatic_user_password_line
}
-
{
username
:
GO_SERVER_GOMATIC_USERNAME
,
password
:
GO_SERVER_GOMATIC_PASSWORD
,
password_hash
:
gomatic_user_password_line
}
when
:
item.username and item.password and item.password_hash
when
:
item.username and item.password and item.password_hash
-
name
:
install ssh key for the secure repos
copy
:
content
:
"
{{
GO_GIT_KEY
}}"
dest
:
~/.ssh/id_rsa
mode
:
0600
become_user
:
"
{{
GO_SERVER_USER
}}"
tags
:
-
git_identity
-
name
:
Check to see if the known hosts file exists
stat
:
path=~/.ssh/known_hosts
become_user
:
"
{{
GO_SERVER_USER
}}"
register
:
known_hosts_register
tags
:
-
git_identity
-
name
:
create known_hosts file
file
:
path
:
~/.ssh/known_hosts
owner
:
"
{{
GO_SERVER_USER
}}"
group
:
"
{{
GO_SERVER_GROUP
}}"
mode
:
0600
state
:
"
{{
'file'
if
known_hosts_register.stat.exists
else
'touch'}}"
become_user
:
"
{{
GO_SERVER_USER
}}"
tags
:
-
git_identity
# Ensure there is no bloat in the known_hosts file and that any duplicates are sorted out. This way the play can be run
# multiple times on the host without any side effects.
-
name
:
setup known_hosts for github.com
command
:
bash -c "ssh-keyscan -t rsa,dsa github.com 2>&1 | sort -u - ~/.ssh/known_hosts > ~/.ssh/tmp_hosts && mv ~/.ssh/tmp_hosts ~/.ssh/known_hosts"
become_user
:
"
{{
GO_SERVER_USER
}}"
tags
:
-
git_identity
-
name
:
restart go-server
-
name
:
restart go-server
service
:
service
:
name
:
"
{{
GO_SERVER_SERVICE_NAME
}}"
name
:
"
{{
GO_SERVER_SERVICE_NAME
}}"
...
...
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