SUMMARY
To_nice_yaml filter in persist task reorders the keys by default. This makes the output more difficult to read and different from what ansible shows with gather action.
ISSUE TYPE
COMPONENT NAME
|
content: "{{ {res: result['gathered']} | to_nice_yaml }}" |
STEPS TO REPRODUCE
Without sort_keys=false the output gets messed from the expected output shown with gather. Adding it produces expected output when compared to the output displayed by gather function. Examples below.
EXPECTED RESULTS
interfaces:
- name: AppGigabitEthernet1/0/1
enabled: false
- name: FortyGigabitEtherneti/1/1
enabled: false
- name: FortyGigabitEthernet1/1/2
enabled: false
- name: GigabitEthernet0/0
description: Management interface
enabled: true
ACTUAL RESULTS
interfaces:
- enabled: false
name: AppGigabitEthernet1/0/1
- enabled: false
name: FortyGigabitEthernet1/1/1
- enabled: false
name: FortyGigabitEthernet1/1/2
- description: Management interface
enabled: true
name: GigabitEthernet0/0
SUMMARY
To_nice_yaml filter in persist task reorders the keys by default. This makes the output more difficult to read and different from what ansible shows with gather action.
ISSUE TYPE
COMPONENT NAME
network.base/roles/resource_manager/includes/write_to_file.yaml
Line 10 in 9e02652
STEPS TO REPRODUCE
Without
sort_keys=falsethe output gets messed from the expected output shown with gather. Adding it produces expected output when compared to the output displayed by gather function. Examples below.EXPECTED RESULTS
ACTUAL RESULTS