ansible ansible_os_family == "RedHat" and ansible_lsb.major_release|int >= 6 转为数字比大小
字符串转换为数字型再去比较
tasks:
- shell: echo "only on Red Hat 6, derivatives, and later"
when: ansible_os_family == "RedHat" and ansible_lsb.major_release|int >= 6
时来天地皆同力,运去英雄不自由