Skip to content

ansible: show yaml merge dicts and bool perks #16

@ioggstream

Description

@ioggstream

show yaml processing

- hosts: localhost
  vars:
    ciao: >
      {"a":1, "b": "B"}
    nuova: >
      {"nuova": "nuova"}
  tasks:
  - debug:
      msg: >
        Merge di due stringhe passando per json {{ciao | from_yaml | combine(nuova | from_yaml) | from_yaml | to_json }}

show bool perks

  - debug: msg="This is always false. bool(dict, str, ...) == False."
    when: ciao | bool

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions