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
32eaf470
Unverified
Commit
32eaf470
authored
Jul 05, 2016
by
arbabnazar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
using proper YAML syntax
parent
eefa76e1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
14 deletions
+18
-14
playbooks/roles/go-server/tasks/download_backup.yml
+9
-9
playbooks/roles/go-server/tasks/main.yml
+4
-1
playbooks/roles/go-server/tasks/restore_backup.yml
+2
-1
playbooks/roles/go-server/tasks/setup_regular_backup.yml
+3
-3
No files found.
playbooks/roles/go-server/tasks/download_backup.yml
View file @
32eaf470
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
-
name
:
install system packages needed for downloading backup
-
name
:
install system packages needed for downloading backup
apt
:
apt
:
pkg
:
"
{{
item
}}"
name
:
"
{{
item
}}"
state
:
present
state
:
present
update_cache
:
true
update_cache
:
true
cache_valid_time
:
3600
cache_valid_time
:
3600
...
@@ -52,19 +52,19 @@
...
@@ -52,19 +52,19 @@
mode
:
0755
mode
:
0755
-
name
:
get s3 one time url
-
name
:
get s3 one time url
s3
:
>
s3
:
bucket
=
"{{ GO_SERVER_BACKUP_S3_BUCKET }}"
bucket
:
"
{{
GO_SERVER_BACKUP_S3_BUCKET
}}"
object
=
"{{ GO_SERVER_BACKUP_S3_OBJECT }}"
object
:
"
{{
GO_SERVER_BACKUP_S3_OBJECT
}}"
mode
=
"geturl"
mode
:
"
geturl"
expiration
=
30
expiration
:
30
when
:
GO_SERVER_BACKUP_S3_BUCKET and GO_SERVER_BACKUP_S3_OBJECT
when
:
GO_SERVER_BACKUP_S3_BUCKET and GO_SERVER_BACKUP_S3_OBJECT
register
:
s3_one_time_url
register
:
s3_one_time_url
-
name
:
download from one time url
-
name
:
download from one time url
get_url
:
get_url
:
url
=
"{{ s3_one_time_url.url }}"
url
:
"
{{
s3_one_time_url.url
}}"
dest
=
"{{ GO_SERVER_TEMP_RESTORE_DIRECTORY }}/{{ GO_SERVER_BACKUP_FILENAME }}"
dest
:
"
{{
GO_SERVER_TEMP_RESTORE_DIRECTORY
}}/{{
GO_SERVER_BACKUP_FILENAME
}}"
mode
=0600
mode
:
"
0600"
when
:
GO_SERVER_BACKUP_S3_BUCKET and GO_SERVER_BACKUP_S3_OBJECT
when
:
GO_SERVER_BACKUP_S3_BUCKET and GO_SERVER_BACKUP_S3_OBJECT
register
:
download_backup_s3
register
:
download_backup_s3
...
...
playbooks/roles/go-server/tasks/main.yml
View file @
32eaf470
...
@@ -33,19 +33,22 @@
...
@@ -33,19 +33,22 @@
-
name
:
install go-server aptitude repository
-
name
:
install go-server aptitude repository
apt_repository
:
apt_repository
:
repo
:
"
{{
GO_SERVER_APT_SOURCE
}}"
repo
:
"
{{
GO_SERVER_APT_SOURCE
}}"
state
:
present
-
name
:
install aptitude key for go-server/go-server
-
name
:
install aptitude key for go-server/go-server
apt_key
:
apt_key
:
url
:
"
{{
GO_SERVER_APT_KEY_URL
}}"
url
:
"
{{
GO_SERVER_APT_KEY_URL
}}"
state
:
present
-
name
:
install go-server using apt-get
-
name
:
install go-server using apt-get
apt
:
apt
:
name
:
"
{{
GO_SERVER_APT_NAME
}}={{
GO_SERVER_VERSION
}}"
name
:
"
{{
GO_SERVER_APT_NAME
}}={{
GO_SERVER_VERSION
}}"
update_cache
:
yes
update_cache
:
yes
state
:
present
-
name
:
install other needed system packages
-
name
:
install other needed system packages
apt
:
apt
:
pkg
:
"
{{
item
}}"
name
:
"
{{
item
}}"
state
:
present
state
:
present
update_cache
:
true
update_cache
:
true
cache_valid_time
:
3600
cache_valid_time
:
3600
...
...
playbooks/roles/go-server/tasks/restore_backup.yml
View file @
32eaf470
...
@@ -27,7 +27,8 @@
...
@@ -27,7 +27,8 @@
#
#
-
name
:
check if H2 db exists
-
name
:
check if H2 db exists
stat
:
"
path={{
GO_SERVER_H2DB_LOCATION
}}"
stat
:
path
:
"
{{
GO_SERVER_H2DB_LOCATION
}}"
register
:
h2db_stat
register
:
h2db_stat
-
name
:
create the db backup directory
-
name
:
create the db backup directory
...
...
playbooks/roles/go-server/tasks/setup_regular_backup.yml
View file @
32eaf470
...
@@ -29,17 +29,17 @@
...
@@ -29,17 +29,17 @@
-
name
:
install required pkgs
-
name
:
install required pkgs
apt
:
apt
:
pkg
:
"
{{
item
}}"
name
:
"
{{
item
}}"
state
:
present
state
:
present
update_cache
:
true
update_cache
:
true
cache_valid_time
:
3600
cache_valid_time
:
3600
with_items
:
GO_SERVER_BACKUP_APT_PKGS
with_items
:
"
{{
GO_SERVER_BACKUP_APT_PKGS
}}"
-
name
:
install required Python modules
-
name
:
install required Python modules
pip
:
pip
:
name
:
"
{{
item
}}"
name
:
"
{{
item
}}"
state
:
present
state
:
present
with_items
:
GO_SERVER_BACKUP_PIP_PKGS
with_items
:
"
{{
GO_SERVER_BACKUP_PIP_PKGS
}}"
-
name
:
create backup shell script
-
name
:
create backup shell script
template
:
template
:
...
...
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