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
7b8575f7
Commit
7b8575f7
authored
Sep 11, 2014
by
Fred Smith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow notifier theme to be checked out from secure repo
parent
3ac4a019
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
2 deletions
+29
-2
playbooks/roles/notifier/defaults/main.yml
+3
-0
playbooks/roles/notifier/tasks/deploy.yml
+22
-2
playbooks/roles/notifier/templates/git_ssh_auth.sh.j2
+2
-0
playbooks/roles/notifier/templates/git_ssh_noauth.sh.j2
+2
-0
No files found.
playbooks/roles/notifier/defaults/main.yml
View file @
7b8575f7
...
...
@@ -16,6 +16,9 @@ NOTIFIER_DIGEST_TASK_INTERVAL: "1440"
NOTIFIER_THEME_NAME
:
"
"
NOTIFIER_THEME_REPO
:
"
"
NOTIFIER_THEME_VERSION
:
"
master"
notifier_git_ssh
:
"
/tmp/notifier_git_ssh.sh"
NOTIFIER_GIT_IDENTITY
:
!!null
notifier_git_identity
:
"
{{
NOTIFIER_HOME
}}/notifier-git-identity"
NOTIFIER_DIGEST_EMAIL_SENDER
:
"
notifications@example.com"
NOTIFIER_DIGEST_EMAIL_SUBJECT
:
"
Daily
Discussion
Digest"
...
...
playbooks/roles/notifier/tasks/deploy.yml
View file @
7b8575f7
...
...
@@ -11,6 +11,25 @@
-
restart notifier-scheduler
-
restart notifier-celery-workers
# Optional auth for git
-
name
:
create ssh script for git (not authenticated)
template
:
>
src=git_ssh_noauth.sh.j2 dest={{ notifier_git_ssh }}
owner={{ NOTIFIER_USER }} mode=750
when
:
not NOTIFIER_USE_GIT_IDENTITY
-
name
:
create ssh script for git (authenticated)
template
:
>
src=git_ssh_auth.sh.j2 dest={{ notifier_git_ssh }}
owner={{ NOTIFIER_USER }} mode=750
when
:
NOTIFIER_USE_GIT_IDENTITY
-
name
:
install read-only ssh key
copy
:
>
content="{{ NOTIFIER_GIT_IDENTITY }}" dest={{ notifier_git_identity }}
force=yes owner={{ NOTIFIER_USER }} mode=0600
when
:
NOTIFIER_USE_GIT_IDENTITY
-
name
:
checkout theme
git
:
>
dest={{ NOTIFIER_CODE_DIR }}/{{NOTIFIER_THEME_NAME}}
...
...
@@ -20,12 +39,13 @@
when
:
NOTIFIER_THEME_NAME != ''
sudo_user
:
"
{{
NOTIFIER_USER
}}"
environment
:
GIT_SSH
:
"
{{
NOTIFIER_GIT_SSH
}}"
GIT_SSH
:
"
{{
notifier_git_ssh
}}"
-
name
:
write notifier local settings
template
:
>
src=settings_local.py.j2
dest={{ NOTIFIER_CODE_DIR }}/settings_local.py
dest={{ NOTIFIER_CODE_DIR }}/notifier/settings_local.py
mode=0555
when
:
NOTIFIER_THEME_NAME != ''
notify
:
-
restart notifier-celery-workers
...
...
playbooks/roles/notifier/templates/git_ssh_auth.sh.j2
0 → 100644
View file @
7b8575f7
#!/bin/sh
exec
/usr/bin/ssh
-o
StrictHostKeyChecking
=
no
-i
{{
notifier_git_identity
}}
"
$@
"
playbooks/roles/notifier/templates/git_ssh_noauth.sh.j2
0 → 100644
View file @
7b8575f7
#!/bin/sh
exec
/usr/bin/ssh
-o
StrictHostKeyChecking
=
no
"
$@
"
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