这是我的剧本。我正在尝试向我的交换机添加一个新的日志服务器。
---
- name: "Add new logging server"
hosts: all
gather_facts: no
tasks:
- name: Add logging server
cisco.ios.ios_logging_global:
config:
hosts:
- hostname: 10.255.0.2
logging_on: enable
trap: informational
该剧本正在工作(它确实添加了服务器),但它不是幂等的。还有其他人有这个问题吗?我检查了 LF 和编码。Galaxy 系列“cisco.ios”的版本是 2.5。
我的版本是:
$ansible --version
ansible 2.10.9
config file = /home/fredr/ansible/ansible.cfg
configured module search path = ['/home/fredr/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/fredr/.local/lib/python3.8/site-packages/ansible
executable location = /home/fredr/.local/bin/ansible
python version = 3.8.10 (default, Jun 2 2021, 10:49:15) [GCC 9.4.0]
我怎样才能使它具有幂等性?