Ansible剧本在SUSE系统上跳过Apache安装的问题求助
Ansible剧本在SUSE系统上跳过Apache安装的问题求助
大家好,我写了一个简单的Ansible剧本,想要在CentOS和SUSE系统上安装Apache。目前这个剧本在CentOS上运行完全正常,但在SUSE上会直接跳过Apache的安装步骤,而且没有任何报错信息,我实在搞不清楚问题出在哪,想请大家帮忙看看。
下面是我的剧本内容:
--- name: To install Apache on CentOS and Suse hosts: all gather_facts: True become: yes become_user: root tasks: - name: Installing Apache on CentOS or RedHat yum: name: httpd state: latest when: ansible_facts['distribution']=="CentOS" or ansible_facts['distribution']=="Red Hat Enterprise Linux" - name: Installing Apache on Suse zypper: name: apache2 state: latest when: ansible_facts['distribution']=="Suse" or ansible_facts['distribution']=="SLES"
备注:内容来源于stack exchange,提问作者emp0001
相关产品推荐
相关产品推荐

