mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
a86f31ac0f
* pythonific!! no camel cases, bitte
* simplified iface attributes parsing
* some improvements, passing tests
* simplified set_interface_option()
* further simplifications
* remove unreachable stmt
* pythonified a file open
* added changelog fragment
* adjustment per PR
* PR: fixed the auto- case
* PR: added testcase and chglog frag for the misleading change report
* extra line removed
* integration is not destructive
(cherry picked from commit 7aae8d5386
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
33 lines
664 B
YAML
33 lines
664 B
YAML
---
|
|
- name:
|
|
set_fact:
|
|
interfaces_testfile: '{{ output_dir }}/interfaces'
|
|
|
|
- name: Copy interfaces file
|
|
copy:
|
|
src: 'files/interfaces_ff'
|
|
dest: '{{ interfaces_testfile }}'
|
|
|
|
- name: Change IP address to 1.2.3.5
|
|
community.general.interfaces_file:
|
|
dest: "{{ interfaces_testfile }}"
|
|
iface: eno1
|
|
option: address
|
|
value: 1.2.3.5
|
|
register: ifile_1
|
|
|
|
- assert:
|
|
that:
|
|
- ifile_1 is changed
|
|
|
|
- name: Change IP address to 1.2.3.5 again
|
|
community.general.interfaces_file:
|
|
dest: "{{ interfaces_testfile }}"
|
|
iface: eno1
|
|
option: address
|
|
value: 1.2.3.5
|
|
register: ifile_2
|
|
|
|
- assert:
|
|
that:
|
|
- ifile_2 is not changed
|