vars:
version: 7.6
tasks:
- name: debug
debug:
msg: "{{ version.split('.')[0] }}"
Что делаю не так?
TASK [debug] ******************************************************************************************************************************************************************************************************
fatal: [127.0.0.1]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'float object' has no attribute 'split'\n\nThe error appears to be in '/home/igor/ansible-role-glusterfs/task.yml': line 9, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n tasks:\n - name: debug\n ^ here\n"}
все написано в ошибке, не тот тип данных, возьмите в кавычки, или приведите 7.6 к текстовому типу
Обсуждают сегодня