ansible/test/integration/targets/junos_config/tests/netconf/single.yaml
Ganesh Nalawade be89ef3eb6 junos_linkagg implementation and junos modules refactor (#26587)
* junos_linkagg implementation and junos modules refactor

*  junos_linkagg implementation
*  junos_linkagg integration test
*  net_linkagg integration test for junos
*  decouple `load_config` and `commit` operations,
   to allow single commit (in case on confirm commit) and
   to perform batch commit (multiple `load_config` followed by single
   `commit`)
*  Other related refactor

* Fix CI issues

* Fix unit test failure
2017-07-11 09:52:53 +05:30

51 lines
1.1 KiB
YAML

---
- debug: msg="START netconf/single.yaml"
# Ensure that when we change the hostname to `localhost` we cause a change
- name: setup
junos_config:
lines:
- set system host-name {{ inventory_hostname_short }}
provider: "{{ netconf }}"
- name: configure single command
junos_config:
lines:
- set system host-name localhost
provider: "{{ netconf }}"
register: result
- assert:
that:
- "result.changed == true"
- "'+ host-name localhost;' in result.diff.prepared"
- name: check single command idempotent
junos_config:
lines:
- set system host-name localhost
provider: "{{ netconf }}"
register: result
- assert:
that:
- "result.changed == false"
- name: confirm previous commit
junos_config:
confirm_commit: yes
provider: "{{ netconf }}"
register: result
- assert:
that:
- "result.changed == true"
- name: teardown
junos_config:
lines:
- set system host-name {{ inventory_hostname_short }}
provider: "{{ netconf }}"
- debug: msg="END netconf/single.yaml"