ansible-collections / community.general

Ansible Community General Collection
https://galaxy.ansible.com/ui/repo/published/community/general/
GNU General Public License v3.0
827 stars 1.52k forks source link

flatpak module: incorrect task status reported for updating depending on language #8883

Open kevonfernando opened 1 month ago

kevonfernando commented 1 month ago

Summary

Installing/Updating apps with the flatpak module always reports changed as task status when language is not english. See flatpak.py line 250

Issue Type

Bug Report

Component Name

flatpak

Ansible Version

$ ansible --version

Community.general Version

$ ansible-galaxy collection list community.general
ansible [core 2.16.10]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/var/home/kevonfernando/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.12/site-packages/ansible
  ansible collection location = /var/home/kevonfernando/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.12.6 (main, Sep  9 2024, 00:00:00) [GCC 14.2.1 20240801 (Red Hat 14.2.1-1)] (/usr/bin/python3)
  jinja version = 3.1.4
  libyaml = True

Configuration

$ ansible-config dump --only-changed

OS / Environment

Control node:

Steps to Reproduce

- name: Install flatpaks from the Flathub remote to the system installation
  community.general.flatpak:
    method: system
    remote: flathub
    name:
      - page.kramo.Cartridges
    state: latest

Expected Results

I expected the reported task status to be ok and not changed.

Actual Results

Code of Conduct

ansibullbot commented 1 month ago

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

ansibullbot commented 1 month ago

cc @JayKayy @oolongbrothers click here for bot help

felixfontein commented 1 month ago

I guess something like module.run_command_environ_update = dict(LANG='C', LC_ALL='C', LC_MESSAGES='C', LC_CTYPE='C') (or using the environ_update parameter of module.run_command() with a similar dict) would help here.