Skip to content

Instantly share code, notes, and snippets.

@alxschwarz
Created November 28, 2016 14:23
Show Gist options
  • Save alxschwarz/21f3995f578d7fbedeb04c0fc7de8ea2 to your computer and use it in GitHub Desktop.
Save alxschwarz/21f3995f578d7fbedeb04c0fc7de8ea2 to your computer and use it in GitHub Desktop.
ansible: register block fail
---
- name: Test
hosts: localhost
tasks:
- name: test mode
shell: echo 1
register: env
- debug: msg="{{ env.stdout }}"
- block:
- name: will never run
shell: echo 2
register: env set_when_task_skipped=false
when: false
- debug: msg="{{ env }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment