【问题标题】:Zookeeper cluster installation using ansible issueZookeeper集群安装使用ansible问题
【发布时间】:2021-08-09 07:25:16
【问题描述】:

我正在使用下面的 github ansible 代码来实现 zookeeper 集群。但我面临以下任务的问题。

我收到如下错误。

【问题讨论】:

    标签: ansible devops apache-zookeeper


    【解决方案1】:

    我查看了github存储库

    https://github.com/AnsibleShipyard/ansible-zookeeper

    您在问题中输入的代码来自upstart.yml

    upstart.yml 包含在RedHat.ymlDebain-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 安装来解决此问题。

    【讨论】:

      猜你喜欢
      • 2019-09-27
      • 1970-01-01
      • 2014-04-23
      • 1970-01-01
      • 1970-01-01
      • 2018-03-15
      • 2021-09-09
      • 1970-01-01
      • 2014-08-28
      相关资源
      最近更新 更多