Commit e03e01bd by Xavier Antoviaque

edxapp-git-auth: Add `EDXAPP_USE_GIT_IDENTITY` boolean to switch on/off

Using `EDXAPP_LOCAL_GIT_IDENTITY` gives parsing errors during evaluation for paths
parent 96eb4b67
...@@ -131,6 +131,7 @@ EDXAPP_SANDBOX_ENFORCE: true ...@@ -131,6 +131,7 @@ EDXAPP_SANDBOX_ENFORCE: true
EDXAPP_INCLUDE_AUTOMATOR_ROLE: false EDXAPP_INCLUDE_AUTOMATOR_ROLE: false
EDXAPP_AUTOMATOR_AUTHORIZED_KEYS: [] EDXAPP_AUTOMATOR_AUTHORIZED_KEYS: []
EDXAPP_USE_GIT_IDENTITY: false
# Example: "{{ secure_dir }}/files/git-identity" # Example: "{{ secure_dir }}/files/git-identity"
EDXAPP_LOCAL_GIT_IDENTITY: !!null EDXAPP_LOCAL_GIT_IDENTITY: !!null
......
...@@ -12,19 +12,19 @@ ...@@ -12,19 +12,19 @@
template: > template: >
src=git_ssh_noauth.sh.j2 dest={{ edxapp_git_ssh }} src=git_ssh_noauth.sh.j2 dest={{ edxapp_git_ssh }}
owner={{ edxapp_user }} mode=750 owner={{ edxapp_user }} mode=750
when: not EDXAPP_LOCAL_GIT_IDENTITY when: not EDXAPP_USE_GIT_IDENTITY
- name: create ssh script for git (authenticated) - name: create ssh script for git (authenticated)
template: > template: >
src=git_ssh_auth.sh.j2 dest={{ edxapp_git_ssh }} src=git_ssh_auth.sh.j2 dest={{ edxapp_git_ssh }}
owner={{ edxapp_user }} mode=750 owner={{ edxapp_user }} mode=750
when: EDXAPP_LOCAL_GIT_IDENTITY when: EDXAPP_USE_GIT_IDENTITY
- name: install read-only ssh key - name: install read-only ssh key
copy: > copy: >
src={{ EDXAPP_LOCAL_GIT_IDENTITY }} dest={{ edxapp_git_identity }} src={{ EDXAPP_LOCAL_GIT_IDENTITY }} dest={{ edxapp_git_identity }}
force=yes owner={{ edxapp_user }} mode=0600 force=yes owner={{ edxapp_user }} mode=0600
when: EDXAPP_LOCAL_GIT_IDENTITY when: EDXAPP_USE_GIT_IDENTITY
# Do A Checkout # Do A Checkout
- name: checkout edx-platform repo into {{edxapp_code_dir}} - name: checkout edx-platform repo into {{edxapp_code_dir}}
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
- name: remove read-only ssh key - name: remove read-only ssh key
file: path={{ edxapp_git_identity }} state=absent file: path={{ edxapp_git_identity }} state=absent
when: EDXAPP_LOCAL_GIT_IDENTITY when: EDXAPP_USE_GIT_IDENTITY
- name: create checksum for requirements, package.json and Gemfile - name: create checksum for requirements, package.json and Gemfile
shell: > shell: >
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment