Commit 9a18013f by Feanil Patel Committed by GitHub

Merge pull request #3604 from edx/feanil/git_logging_flag

Add a flag to easily turn on/off the logging.
parents 4e554255 f4d2aacc
......@@ -30,4 +30,5 @@
#
##
# Defaults for role git_clone
#
GIT_CLONE_NO_LOGGING: true
......@@ -19,11 +19,11 @@
#
# Rewrite this task using the ansible git-config module once we'll migrate to Ansible 2.x
# https://docs.ansible.com/ansible/git_config_module.html#git-config
#
- name: Set git fetch.prune to ignore deleted remote refs
shell: git config --global fetch.prune true
become_user: "{{ repo_owner }}"
no_log: true
no_log: "{{ GIT_CLONE_NO_LOGGING }}"
when: repo_owner is defined and GIT_REPOS|length > 0
tags:
- install
......@@ -34,7 +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
no_log: "{{ GIT_CLONE_NO_LOGGING }}"
tags:
- install
- install:code
......@@ -49,7 +49,7 @@
mode: "0600"
when: item.PROTOCOL == "ssh" and GIT_REPOS is defined
with_items: "{{ GIT_REPOS }}"
no_log: true
no_log: "{{ GIT_CLONE_NO_LOGGING }}"
tags:
- install
- install:code
......@@ -65,7 +65,7 @@
register: code_checkout
when: item.PROTOCOL == "ssh" and GIT_REPOS is defined
with_items: "{{ GIT_REPOS }}"
no_log: true
no_log: "{{ GIT_CLONE_NO_LOGGING }}"
tags:
- install
- install:code
......@@ -79,7 +79,7 @@
register: code_checkout
when: item.PROTOCOL == "https" and GIT_REPOS is defined
with_items: "{{ GIT_REPOS }}"
no_log: true
no_log: "{{ GIT_CLONE_NO_LOGGING }}"
tags:
- install
- install:code
......@@ -90,7 +90,7 @@
state: absent
when: item.PROTOCOL == "ssh" and GIT_REPOS is defined
with_items: "{{ GIT_REPOS }}"
no_log: true
no_log: "{{ GIT_CLONE_NO_LOGGING }}"
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