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
8dbf4c89
Commit
8dbf4c89
authored
8 years ago
by
Brian Beggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TE-1430: add gomatic automation user
parent
c29f4b2d
Show 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 @
8dbf4c89
...
@@ -50,6 +50,8 @@ GO_SERVER_ADMIN_USERNAME: ""
...
@@ -50,6 +50,8 @@ GO_SERVER_ADMIN_USERNAME: ""
GO_SERVER_ADMIN_PASSWORD
:
"
"
GO_SERVER_ADMIN_PASSWORD
:
"
"
GO_SERVER_BACKUP_USERNAME
:
"
"
GO_SERVER_BACKUP_USERNAME
:
"
"
GO_SERVER_BACKUP_PASSWORD
:
"
"
GO_SERVER_BACKUP_PASSWORD
:
"
"
GO_SERVER_GOMATIC_USERNAME
:
"
"
GO_SERVER_GOMATIC_PASSWORD
:
"
"
# go-server network settings
# go-server network settings
GO_SERVER_PORT
:
8153
GO_SERVER_PORT
:
8153
...
...
This diff is collapsed.
Click to expand it.
playbooks/roles/go-server/tasks/main.yml
View file @
8dbf4c89
...
@@ -87,6 +87,12 @@
...
@@ -87,6 +87,12 @@
register
:
backup_user_password_line
register
:
backup_user_password_line
when
:
GO_SERVER_BACKUP_USERNAME and GO_SERVER_BACKUP_PASSWORD
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
-
name
:
setup password file
template
:
template
:
src
:
edx/app/go-server/password.txt.j2
src
:
edx/app/go-server/password.txt.j2
...
@@ -95,7 +101,7 @@
...
@@ -95,7 +101,7 @@
owner
:
"
{{
GO_SERVER_USER
}}"
owner
:
"
{{
GO_SERVER_USER
}}"
group
:
"
{{
GO_SERVER_GROUP
}}"
group
:
"
{{
GO_SERVER_GROUP
}}"
force
:
no
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
-
name
:
install go-server configuration
template
:
template
:
...
@@ -109,19 +115,16 @@
...
@@ -109,19 +115,16 @@
-
include
:
download_backup.yml
-
include
:
download_backup.yml
when
:
GO_SERVER_BACKUP_S3_BUCKET and GO_SERVER_BACKUP_S3_OBJECT and GO_SERVER_RESTORE_BACKUP
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
-
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_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
lineinfile
:
lineinfile
:
dest
:
"
{{
GO_SERVER_CONF_HOME
}}/{{
GO_SERVER_PASSWORD_FILE_NAME
}}"
dest
:
"
{{
GO_SERVER_CONF_HOME
}}/{{
GO_SERVER_PASSWORD_FILE_NAME
}}"
regexp
:
"
^{{
GO_SERVER_BACKUP_USERNAME
}}"
regexp
:
"
^{{
item.username
}}"
line
:
"
{{
backup_user_password_line.stdout
}}"
line
:
"
{{
item.password_hash.stdout
}}"
when
:
GO_SERVER_BACKUP_USERNAME and GO_SERVER_BACKUP_PASSWORD
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
-
name
:
restart go-server
service
:
service
:
...
...
This diff is collapsed.
Click to expand it.
playbooks/roles/go-server/templates/edx/app/go-server/password.txt.j2
View file @
8dbf4c89
{{ admin_user_password_line.stdout }}
{{ admin_user_password_line.stdout }}
{{ backup_user_password_line.stdout }}
{{ backup_user_password_line.stdout }}
{{ gomatic_user_password_line.stdout }}
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