linux-system-roles/network

network_state functionality doesn't appear to be idempotent

Closed this issue · 1 comments

When using the "network_state" functionality, it doesn't appear to be idempotent

Example playbook:

- name: Configure DNS
  hosts: all
  tasks:
    - name: Configure DNS
      import_role:
        name: /tmp/network
      vars:
        network_state:
          dns-resolver:
            config:
              server:
                - 192.168.0.2

Playbook reports "Configure networking state" task as changed every time when run. This is on a Fedora 36 host.

As alluded by Gris, the == compare of current state and previous state is incorrect for
change indicator, there might be data like bridge timer which is also considered when comparing the previous state and current state. Therefore, additional patch will be anticipated to address the problem.