【发布时间】:2021-08-09 07:25:16
【问题描述】:
【问题讨论】:
标签: ansible devops apache-zookeeper
【问题讨论】:
标签: ansible devops apache-zookeeper
我查看了github存储库
https://github.com/AnsibleShipyard/ansible-zookeeper
您在问题中输入的代码来自upstart.yml
upstart.yml 包含在RedHat.yml 和Debain-tarball.yml 中
从您的错误来看,Debian-tarball.yml 似乎正在被执行,我将对此进行解释。
Debian-tarball.yml 有以下代码
- include_tasks: upstart.yml
when: not zookeeper_debian_systemd_enabled
tags: deploy
在检查 when 条件并评估 zookeeper_debian_systemd_enabled ansible 时出现错误。
zookeeper_debian_systemd_enabled var 在main.yml 中定义如下
_ubuntu_1504: "{{ ansible_distribution == 'Ubuntu' and ansible_distribution_version|version_compare(15.04, '>=') }}"
_debian_8: "{{ ansible_distribution == 'Debian' and ansible_distribution_version|version_compare(8.0, '>=') }}"
zookeeper_debian_systemd_enabled: "{{ _ubuntu_1504 or _debian_8 }}"
所以真正的问题是version_compare 过滤器,它在那里失败了。您可能需要升级 ansible 安装来解决此问题。
【讨论】: