| --- |
| # tasks file for apigee-opdk-debug-mode |
| - block: |
| - name: Collect all bash scripts |
| find: |
| paths: '{{ apigee_installation_home }}' |
| contains: '^\#\$.*bash$' |
| register: debug_scripts |
| |
| - name: Add debug flag |
| lineinfile: |
| backrefs: yes |
| backup: yes |
| regexp: '(^\#\$.*bash$)' |
| line: '\1 -x' |
| when: opdk_debug_mode is defined and opdk_debug_mode == 'on' |
| |
| - block: |
| - name: Collect all bash scripts |
| find: |
| paths: '{{ apigee_installation_home }}' |
| contains: '^\#\$.*bash -x$' |
| register: debug_scripts |
| |
| - name: Add debug flag |
| lineinfile: |
| backrefs: yes |
| backup: yes |
| regexp: '(^\#\$.*bash$) (-x)' |
| line: '\1' |
| when: opdk_debug_mode is defined and opdk_debug_mode == 'off' |