Commit 4ed96e00 by Saleem Latif Committed by GitHub

Merge pull request #3361 from edx/saleem-latif/SOL-2037-ssh-key-leakage

SOL-2037: Make sure ssh private keys are not leaked
parents 818388c0 6a902954
......@@ -126,7 +126,7 @@ class CallbackModule(object):
def runner_on_ok(self, host, res):
if self.enabled:
# don't send the setup results
if res['invocation']['module_name'] != "setup":
if 'invocation' in res and 'module_name' in res['invocation'] and res['invocation']['module_name'] != "setup":
self._process_message(res, 'OK')
......
......@@ -93,7 +93,7 @@ class CallbackModule(object):
def runner_on_ok(self, host, res):
if self.enable_sqs:
# don't send the setup results
if res['invocation']['module_name'] != "setup":
if 'invocation' in res and 'module_name' in res['invocation'] and res['invocation']['module_name'] != "setup":
self._send_queue_message(res, 'OK')
def playbook_on_task_start(self, name, is_conditional):
......
......@@ -24,6 +24,7 @@
shell: git config --global fetch.prune true
become_user: "{{ repo_owner }}"
when: GIT_REPOS is defined
no_log: true
tags:
- install
- install:code
......@@ -33,6 +34,7 @@
msg: '{{ GIT_REPOS.PROTOCOL }} must be "https" or "ssh"'
when: (item.PROTOCOL != "https") and (item.PROTOCOL != "ssh") and GIT_REPOS is defined
with_items: GIT_REPOS
no_log: true
tags:
- install
- install:code
......@@ -47,6 +49,7 @@
mode: "0600"
when: item.PROTOCOL == "ssh" and GIT_REPOS is defined
with_items: GIT_REPOS
no_log: true
tags:
- install
- install:code
......@@ -62,6 +65,7 @@
register: code_checkout
when: item.PROTOCOL == "ssh" and GIT_REPOS is defined
with_items: GIT_REPOS
no_log: true
tags:
- install
- install:code
......@@ -75,6 +79,7 @@
register: code_checkout
when: item.PROTOCOL == "https" and GIT_REPOS is defined
with_items: GIT_REPOS
no_log: true
tags:
- install
- install:code
......@@ -85,6 +90,7 @@
state: absent
when: item.PROTOCOL == "ssh" and GIT_REPOS is defined
with_items: GIT_REPOS
no_log: true
tags:
- install
- install:code
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