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

83 lines
1.7 KiB
YAML
Raw Normal View History

---
- 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"