1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/integration/targets/fortios_address/tasks/test_indempotency.yml
Benjamin Jolivot 753b26ccf9 Manage Fortios/Fortigate Address (#21542)
* New module fortios_address

* Add module_utils required_if + fix Doc

* Merge spec & required_if from module_utils

* Fix pep8

* Py2.5 compat , cosmetic changes

* Fix param timeout

* Fortios_address module + integration tests

* add netaddr library in requirements for integration tests

* Pep8 problems

* ANSIBLE_METADATA.version -> ANSIBLE_METADATA.metadata_version
2017-08-01 11:17:12 -06:00

82 lines
1.7 KiB
YAML

---
- name: Add address
fortios_address:
file_mode: true
config_file: "{{role_path}}/files/default_config.conf"
name: github
value: 192.30.253.113
state: present
register: add_addr
- name: Assert
assert:
that:
- "add_addr.changed == true"
- name: Add the same address
fortios_address:
file_mode: true
config_file: "{{role_path}}/files/default_config.conf"
name: github
value: 192.30.253.113
state: present
register: add_addr
- name: Assert
assert:
that:
- "add_addr.changed == false"
- name: change value
fortios_address:
file_mode: true
config_file: "{{role_path}}/files/default_config.conf"
name: github
value: 192.1.2.3
state: present
register: change_addr
- name: Assert
assert:
that:
- "change_addr.changed == true"
- name: change value second time
fortios_address:
file_mode: true
config_file: "{{role_path}}/files/default_config.conf"
name: github
value: 192.1.2.3
state: present
register: change_addr
- name: Assert
assert:
that:
- "change_addr.changed == false"
- name: Delete existing address
fortios_address:
file_mode: true
config_file: "{{role_path}}/files/default_config.conf"
name: github
state: absent
register: del_addr
- name: Assert
assert:
that:
- "del_addr.changed == true"
- name: Delete same existing address
fortios_address:
file_mode: true
config_file: "{{role_path}}/files/default_config.conf"
name: github
state: absent
register: del_addr
- name: Assert
assert:
that:
- "del_addr.changed == false"