Hi,
I recently updated my ansible to version 2.19 and have been getting the following warning:
[WARNING]: Found variable using reserved name 'environment'.
The thing is that I’m actually trying to set environment variables at the task level like described in the documentation: Setting the remote environment — Ansible Community Documentation
This is a minimal playbook used for testing to reproduce the problem.
---
- name: environment test
  hosts: 1.2.3.4
  tasks:
    - name: run apt upgrade
      ansible.builtin.apt:
        update_cache: true
        upgrade: "safe"
      environment:
        ACCEPT_EULA: 'Y'
Oddly ansible doesn’t throw a warning if run against localhost. So I assume it might by python3 specific (3.12.3 on the client, 3.10.12 on the server) or I’m using it wrong?