summaryrefslogtreecommitdiff
path: root/test/integration/targets/nxos_system/tests/nxapi/set_domain_name.yaml
blob: 13adfcbf4b87c13b6976235a16be5bc26846a5b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
---
- debug: msg="START nxapi/set_domain_name.yaml"

- name: setup
  nxos_config:
    lines: no ip domain-name eng.ansible.com
    match: none
# NXAPI errors if you try to remove something that doesn't exist
  ignore_errors: yes

- name: configure domain_name
  nxos_system:
    domain_name: eng.ansible.com
  register: result

- assert:
    that:
      - "result.changed == true"

- name: verify domain_name
  nxos_system:
    domain_name: eng.ansible.com
  register: result

- assert:
    that:
      - "result.changed == false"

- name: teardown
  nxos_config:
    lines: no ip domain-name eng.ansible.com
    match: none

- debug: msg="END nxapi/set_domain_name.yaml"