Cant use dash with numbers as hostname

Hi all,

is there a way to escape the dash/minus in the hostname (when using numbers)

hostfile:

test1 ansible_host=10-1
test2 ansible_host=“10-1”

Result:

bash-4.4# ansible-inventory -i hosts --list
{
“_meta”: {
“hostvars”: {
“test1”: {
“ansible_host”: 9
},
“test2”: {
“ansible_host”: 9
}
}
},
“all”: {
“children”: [
“ungrouped”
]
},
“ungrouped”: {
“hosts”: [
“test1”,
“test2”
]
}
}

The ansible-inventory made a calculation for the var …

Thanks & regards
CWollinger