Skip to content

Passing 'warnings' to 'exit_json' or 'fail_json' is deprecated warning with Ansible 2.20 #830

@rlenferink

Description

@rlenferink

What happened:

When using the latest release of this role (1.17.7) with Ansible 2.20, the following warning is given:

TASK [linux-system-roles.network : Configure networking connection profiles] **************************************************************************************************************************************
[DEPRECATION WARNING]: Passing `warnings` to `exit_json` or `fail_json` is deprecated. This feature will be removed from ansible-core version 2.23. Use `AnsibleModule.warn` instead.
changed: [proxy-vm1.loc]

What you expected to happen:

I expected that no deprecation warnings were given when using this Ansible role.

How to reproduce it (as minimally and precisely as possible):

Use this role with Ansible 2.20.1

Anything else we need to know?:

  • Role version = 1.17.7
  • Ansible version = 2.20.1

Metadata

Metadata

Assignees

No one assigned

    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