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
c20209ec
Commit
c20209ec
authored
Jul 18, 2016
by
Brian Beggs
Committed by
GitHub
Jul 18, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3249 from edx/bbeggs/TE-1430
TE-1430: add gomatic automation user
parents
3115c196
8dbf4c89
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
12 deletions
+18
-12
playbooks/roles/go-server/defaults/main.yml
+2
-0
playbooks/roles/go-server/tasks/main.yml
+15
-12
playbooks/roles/go-server/templates/edx/app/go-server/password.txt.j2
+1
-0
No files found.
playbooks/roles/go-server/defaults/main.yml
View file @
c20209ec
...
...
@@ -50,6 +50,8 @@ GO_SERVER_ADMIN_USERNAME: ""
GO_SERVER_ADMIN_PASSWORD
:
"
"
GO_SERVER_BACKUP_USERNAME
:
"
"
GO_SERVER_BACKUP_PASSWORD
:
"
"
GO_SERVER_GOMATIC_USERNAME
:
"
"
GO_SERVER_GOMATIC_PASSWORD
:
"
"
# go-server network settings
GO_SERVER_PORT
:
8153
...
...
playbooks/roles/go-server/tasks/main.yml
View file @
c20209ec
...
...
@@ -87,6 +87,12 @@
register
:
backup_user_password_line
when
:
GO_SERVER_BACKUP_USERNAME and GO_SERVER_BACKUP_PASSWORD
-
name
:
generate line for go-server password file for gomatic user
command
:
>
/usr/bin/htpasswd -nbs "{{ GO_SERVER_GOMATIC_USERNAME }}" "{{ GO_SERVER_GOMATIC_PASSWORD }}"
register
:
gomatic_user_password_line
when
:
GO_SERVER_GOMATIC_USERNAME and GO_SERVER_GOMATIC_PASSWORD
-
name
:
setup password file
template
:
src
:
edx/app/go-server/password.txt.j2
...
...
@@ -95,7 +101,7 @@
owner
:
"
{{
GO_SERVER_USER
}}"
group
:
"
{{
GO_SERVER_GROUP
}}"
force
:
no
when
:
GO_SERVER_ADMIN_PASSWORD and GO_SERVER_BACKUP_PASSWORD
when
:
GO_SERVER_ADMIN_PASSWORD and GO_SERVER_BACKUP_PASSWORD
AND GO_SERVER_GOMATIC_PASSWORD
-
name
:
install go-server configuration
template
:
...
...
@@ -109,19 +115,16 @@
-
include
:
download_backup.yml
when
:
GO_SERVER_BACKUP_S3_BUCKET and GO_SERVER_BACKUP_S3_OBJECT and GO_SERVER_RESTORE_BACKUP
-
name
:
replace the admin line in the password file post-restore
lineinfile
:
dest
:
"
{{
GO_SERVER_CONF_HOME
}}/{{
GO_SERVER_PASSWORD_FILE_NAME
}}"
regexp
:
"
^{{
GO_SERVER_ADMIN_USERNAME
}}"
line
:
"
{{
admin_user_password_line.stdout
}}"
when
:
GO_SERVER_ADMIN_USERNAME and GO_SERVER_ADMIN_PASSWORD
-
name
:
replace the backup line in the password file post-restore
-
name
:
replace the password lines in the password file post-restore
lineinfile
:
dest
:
"
{{
GO_SERVER_CONF_HOME
}}/{{
GO_SERVER_PASSWORD_FILE_NAME
}}"
regexp
:
"
^{{
GO_SERVER_BACKUP_USERNAME
}}"
line
:
"
{{
backup_user_password_line.stdout
}}"
when
:
GO_SERVER_BACKUP_USERNAME and GO_SERVER_BACKUP_PASSWORD
regexp
:
"
^{{
item.username
}}"
line
:
"
{{
item.password_hash.stdout
}}"
with_items
:
-
{
username
:
GO_SERVER_ADMIN_USERNAME
,
password
:
GO_SERVER_ADMIN_PASSWORD
,
password_hash
:
admin_user_password_line
}
-
{
username
:
GO_SERVER_BACKUP_USERNAME
,
password
:
GO_SERVER_BACKUP_PASSWORD
,
password_hash
:
backup_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
-
name
:
restart go-server
service
:
...
...
playbooks/roles/go-server/templates/edx/app/go-server/password.txt.j2
View file @
c20209ec
{{ admin_user_password_line.stdout }}
{{ backup_user_password_line.stdout }}
{{ gomatic_user_password_line.stdout }}
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