Last active
December 9, 2015 07:41
-
-
Save aboyett/8d4fccb825846193baa9 to your computer and use it in GitHub Desktop.
ansible variable type preservation test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: type preservation test | |
hosts: localhost | |
sudo: no | |
gather_facts: no | |
vars: | |
num_var: 5 | |
num_ref: "{{ num_var }}" | |
num_cast_ref: "{{ num_var | int }}" | |
bool_var: yes | |
bool_ref: "{{ bool_var }}" | |
nul: null | |
null_ref: "{{ nul }}" | |
null2: None | |
null2_ref: "{{ null }}" | |
var_map: | |
num: "{{ num_var }}" | |
num_ref: "{{ num_ref | int }}" | |
num_ref_cast: "{{ num_ref | int }}" | |
num_cast_ref: "{{ num_cast_ref }}" | |
num_cast_ref_cast: "{{ num_cast_ref | int }}" | |
bool_var: "{{ bool_var }}" | |
bool_ref: "{{ bool_ref }}" | |
nul: "{{ nul }}" | |
null_ref: "{{ null_ref }}" | |
null2_map: | |
null2: "{{ null2 }}" | |
null2_ref: "{{ null2_ref }}" | |
tasks: | |
- name: numeric type preservation test | |
debug: var=var_map | |
- name: "null evaluation failure" | |
debug: var=null2_map |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment