如何设置VRF和源接口ios_logging ansible

时间:2018-10-19 19:11:55

标签: logging networking ansible

要从ansible如下配置开关,我们如何为该配置文件的后4行编写剧本?任何意见和建议表示赞赏。

...
logging trap informational
logging console informational
logging vrf MGMT host 10.2.5.7
logging host 10.5.3.7 5454
Logging vrf MGMT source-interface Management1
Logging source-interface Loopback0

Ansible:

- name: config trap logging and level
  ios_logging:
    dest: trap   # Is it available?
    level: informational
    state: present

- name: config console logging and level
  ios_logging:
    dest: console
    level: informational
    state: present

- name: config vrf and host # not enough documentation I could find
  ios_logging:
    dest:    # how to get the vrf VRF or is it host?
    name: 10.2.5.7 # only if the dest. is host
    state: present

- name: config host and name
  ios_logging:
    dest: host
    name: '10.5.3.7 5454'
    state: present

- name: config vrf and source-interface # not enough documentation I could find
  ios_logging:
    dest:    # how to get the vrf VRF or is it host?
    name: ?    # source-interface part
    state: present

- name: config source-interface # same issue
  ios_logging:
    dest: source-interface    # is this a way?
    name: Loopback0    # someone tell me this is a way
    state: present

0 个答案:

没有答案