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
6f505939
Commit
6f505939
authored
Feb 18, 2014
by
John Jarvis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moving s3 sync script to the AWS role
parent
37fb7958
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
22 deletions
+32
-22
playbooks/roles/aws/defaults/main.yml
+2
-0
playbooks/roles/aws/tasks/main.yml
+30
-1
playbooks/roles/common/tasks/main.yml
+0
-21
No files found.
playbooks/roles/aws/defaults/main.yml
View file @
6f505939
...
...
@@ -16,7 +16,9 @@
#
aws_role_name
:
aws
aws_data_dir
:
"
{{
COMMON_DATA_DIR
}}/aws"
aws_app_dir
:
"
{{
COMMON_APP_DIR
}}/aws"
aws_var_file
:
"
{{
aws_data_dir
}}/server-vars.yml"
aws_s3_sync_script
:
"
{{
aws_app_dir
}}/send-logs-to-s3"
#
# OS packages
...
...
playbooks/roles/aws/tasks/main.yml
View file @
6f505939
...
...
@@ -51,7 +51,7 @@
state=link
-
name
:
clean up var file, removing all version vars and internal ansible vars
shell
:
sed -i -e "/{{item}}/d" {{
edx_ansible
_var_file }}
shell
:
sed -i -e "/{{item}}/d" {{
aws
_var_file }}
with_items
:
# deploy versions
-
"
^edx_platform_version:"
...
...
@@ -76,3 +76,32 @@
-
"
^delegate_to:"
-
"
^ansible_ssh_private_key_file:"
-
"
^always_run:"
-
name
:
create s3 log sync script
template
:
>
dest={{ aws_s3_sync_script }}
src=send-logs-to-s3.j2 mode=0755 owner=root group=root
when
:
AWS_S3_LOGS
-
name
:
create symlink for s3 log sync script
file
:
>
state=link
src={{ COMMON_BIN_DIR }}/{{ aws_s3_sync_script|basename }}
path={{ aws_s3_sync_script }}
when
:
AWS_S3_LOGS
-
name
:
run s3 log sync script on shutdown
file
:
>
state=link
src={{ COMMON_BIN_DIR }}/send-logs-to-s3
path=/etc/rc0.d/S00send-logs-to-s3
when
:
AWS_S3_LOGS
-
name
:
cronjob for s3 log sync
cron
:
>
name="cronjob for s3 log sync"
user=root
minute=0
job={{ aws_s3_sync_script }}
when
:
AWS_S3_LOGS
playbooks/roles/common/tasks/main.yml
View file @
6f505939
...
...
@@ -102,24 +102,3 @@
dest=/etc/ssh/sshd_config
src=sshd_config.j2 mode=0644 owner=root group=root
notify
:
restart ssh
-
name
:
create s3 log sync script
template
:
>
dest={{ COMMON_BIN_DIR }}/send-logs-to-s3
src=send-logs-to-s3.j2 mode=0755 owner=root group=root
when
:
COMMON_S3_LOGS
-
name
:
run s3 log sync script on shutdown
file
:
>
state=link
src={{ COMMON_BIN_DIR }}/send-logs-to-s3
path=/etc/rc0.d/S00send-logs-to-s3
when
:
COMMON_S3_LOGS
-
name
:
cronjob for s3 log sync
cron
:
>
name="cronjob for s3 log sync"
user=root
minute=0
job={{ COMMON_BIN_DIR }}/send-logs-to-s3
when
:
COMMON_S3_LOGS
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