I’ve search some reference but still got no luck about divide operations in ansible.
default/main.yml
mariadb_setmem: “{{ ansible_memtotal_mb 10241024 }}”
mariadb_misc_query_prealloc_size: “{{ mariadb_setmem *0.01 }}”
task/main.yml
- name: Debugging Value
debug:
msg: “{{ mariadb_misc_query_prealloc_size }}”
And got error.
fatal: [vagrant01] => Failed to template {{ mariadb_misc_query_prealloc_size }}: Failed to template {{ mariadb_setmem *0.01 }}: an unexpected type error occurred. Error was can’t multiply sequence by non-int of type ‘float’
Is there any hints to got the results of the math operations and round it?
Any helps are appreciated.