1- debug: msg="START CLI/RESET.YAML"
2
3- name: Change endpoint ports back to default values
4  eos_config:
5    lines: default management api http-commands
6    match: none
7    provider: "{{ cli }}"
8  register: eos_eapi_output
9  connection: local
10
11- eos_command:
12    commands:
13      - show management api http-commands | json
14    provider: "{{ cli }}"
15  register: http_config
16  connection: local
17
18- name: Expect endpoint ports to have default port values
19  assert:
20    that:
21        - http_config.stdout[0].httpServer.port == 80
22        - http_config.stdout[0].httpsServer.port == 443
23        - http_config.stdout[0].localHttpServer.port == 8080
24
25- name: Change endpoint ports back to default values again
26  eos_config:
27    lines: default management api http-commands
28    match: none
29    provider: "{{ cli }}"
30  register: eos_eapi_output
31  connection: local
32
33- name: Expect action to be idempotent
34  assert:
35    that:
36      - "eos_eapi_output.changed == false"
37
38- debug: msg="END CLI/RESET.YAML"
39