Skip to content

Need further output from "check" mode #690

@ts97783

Description

@ts97783

Hi,

Is there a way to see the intended changes using "check" mode?

The below play will add route 200.52.100.128/26 via 10.140.4.129 (this is the desired outcome).

---
- name: Configure the network
  hosts: test01.test.com
  tasks:
    - name: Configure an Ethernet connection with static IP
      ansible.builtin.include_role:
        name: rhel-system-roles.network
      vars:
        network_connections:
          - name: eno2
            interface_name: eno2
            type: ethernet
            ip:
              address:
                - 10.140.4.138/28
              route:
                - network: 198.51.100.128
                  prefix: 26
                  gateway: 10.140.4.129
                - network: 199.51.100.128
                  prefix: 26
                  gateway: 10.140.4.129
                - network: 200.51.100.128
                  prefix: 26
                  gateway: 10.140.4.129
                - network: 200.52.100.128
                  prefix: 26
                  gateway: 10.140.4.129
            state: up

Running the play shows the below.

TASK [rhel-system-roles.network : Show stderr messages] *******************************************************************
ok: [test01.test.com] => {
    "__network_connections_result.stderr_lines": [
        "[001] <info>  #0, state:up persistent_state:present, 'eno2': update connection eno2, cea93b93-c22c-4393-bdfe-3f01b1b07ca5", 
        "[002] <info>  #0, state:up persistent_state:present, 'eno2': up connection eno2, cea93b93-c22c-4393-bdfe-3f01b1b07ca5 (is-modified)"
    ]
}

We see "update connection eno2" but we're unable to gather any further information on the expected change.

Is there any method that would show the route to be added using "check" mode?

How does the role determine that a route needs to be added? I suspect we could simply add a "debug" to that specific task to view the intended outcome?

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions