摘要: [root@localhost ansible]# cat zabbix_install.yml - hosts: 101.251.237.253 tasks: - name: step1 ping: - name: step2 install zabbix3.4 source shell: rpm 阅读全文
posted @ 2018-05-23 17:25 滴滴滴 阅读(301) 评论(0) 推荐(0)
摘要: 问题解决了,用IP: "{{ ansible_eth0'ipv4' }}" 而不是{{ansible_all_ipv4_addresses}} 修改了之后的playbook 如下: 阅读全文
posted @ 2018-05-23 15:29 滴滴滴 阅读(1525) 评论(0) 推荐(0)
摘要: 字符串转换为数字型再去比较 tasks: - shell: echo "only on Red Hat 6, derivatives, and later" when: ansible_os_family == "RedHat" and ansible_lsb.major_release|int > 阅读全文
posted @ 2018-05-23 14:54 滴滴滴 阅读(1798) 评论(0) 推荐(0)