Skip to content

Instantly share code, notes, and snippets.

@sivel
Created May 29, 2025 16:47
Show Gist options
  • Save sivel/41bf0467f7bab02d3210199b0be37c8a to your computer and use it in GitHub Desktop.
Save sivel/41bf0467f7bab02d3210199b0be37c8a to your computer and use it in GitHub Desktop.
2025 Red Hat Summit ansible-core demo
- hosts: localhost
gather_facts: false
vars:
test:
slow: '{{ lookup("pipe", "sleep 10") }}'
fast: 'fast'
tasks:
- tags:
- never
- fast
block:
- name: look how fast I am!
debug:
msg: '{{ test.fast }}'
- tags:
- never
- cond1
- conditionals
block:
- name: equality issue
debug:
when:
- conditional_var == 'bar: baz'
vars:
conditional_var: 'foo'
- tags:
- never
- errors
block:
- name: error messages
debug:
when: '"foo" | is'
- tags:
- never
- native
block:
- name: integers
debug:
msg:
type: '{{ val | type_debug }}'
value: '{{ val }}'
vars:
val: '{{ 1 + 1 }}'
- name: None
debug:
msg:
type: '{{ val | type_debug }}'
value: '{{ val }}'
vars:
val: '{{ none }}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment