mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
21 lines
610 B
YAML
21 lines
610 B
YAML
|
- hosts: localhost
|
||
|
gather_facts: false
|
||
|
vars:
|
||
|
string_var: "no"
|
||
|
tasks:
|
||
|
- set_fact:
|
||
|
this_is_string: "yes"
|
||
|
this_is_not_string: yes
|
||
|
this_is_also_string: "{{ string_var }}"
|
||
|
this_is_another_string: !!str "{% set thing = '' + string_var + '' %}{{ thing }}"
|
||
|
this_is_more_strings: '{{ string_var + "" }}'
|
||
|
|
||
|
- assert:
|
||
|
that:
|
||
|
- string_var == 'no'
|
||
|
- this_is_string == True
|
||
|
- this_is_not_string == True
|
||
|
- this_is_also_string == False
|
||
|
- this_is_another_string == False
|
||
|
- this_is_more_strings == False
|