on the module, if I specify:
percent_snapshot_space: "{( snapshot_percent }}"
Then it produces error. The variable is set at AWX, passed as -e variables.
output:
TASK [show types of each var] **************************************************
task path: /runner/project/create_vol.yml:20
ok: [localhost] => {
"msg": "sizegb → int\nsnapshot_percent → int\nis_encrypted → bool\nvol_type → AnsibleUnicode\n"
}
TASK [create the volume] *******************************************************
task path: /runner/project/create_vol.yml:38
fatal: [localhost]: FAILED! => {"changed": false, "msg": "argument 'percent_snapshot_space' is of type <class 'str'> and we were unable to convert to int: <class 'str'> cannot be converted to an int"}
But, as you can see from first task, "snapshot_percent" is passed in as int. Even set below did not work.
percent_snapshot_space: "{{ snapshot_percent | int }}"
However, if I specify number directly:
percent_snapshot_space: 10
The playbook runs fine.
I am out of clues.