Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Puppet fails with invalid byte sequence in US-ASCII #8000

Closed
1 task done
Knalltuete5000 opened this issue Feb 21, 2024 · 2 comments · Fixed by #8001
Closed
1 task done

Puppet fails with invalid byte sequence in US-ASCII #8000

Knalltuete5000 opened this issue Feb 21, 2024 · 2 comments · Fixed by #8001
Labels
bug This issue/PR relates to a bug has_pr module module plugins plugin (any type)

Comments

@Knalltuete5000
Copy link
Contributor

Summary

When executing the puppet agent via ansible on a remote host, the command fails with invalid byte sequence in US-ASCII.
Executing the puppet agent on the remote host via a shell the command successfully ends with return code 0.

It looks due to shell environment used by ansible to execute the command the shell is not utf-8 compatible

Issue Type

Bug Report

Component Name

puppet

Ansible Version

$ ansible --version
ansible [core 2.14.6]

Community.general Version

$ ansible-galaxy collection list community.general

community.general 8.3.0

Configuration

$ ansible-config dump --only-changed
CALLBACKS_ENABLED = ['ansible.posix.timer', 'ansible.posix.profile_tasks', 'ansible.posix.profile_roles']
COLLECTIONS_PATHS = ['/home/niklas/Documents/inovex/cloud/inovex-cloud-ansible/external/collections']
DEFAULT_FORKS = 30
DEFAULT_STDOUT_CALLBACK = community.general.diy
ENABLE_TASK_DEBUGGER = True
HOST_KEY_CHECKING = False
RETRY_FILES_ENABLED = False

OS / Environment

Local: Ubuntu 23.10
Remote: Ubuntu 22.04

Steps to Reproduce

Because of the dependency to puppet and the puppet code I cannot give an example to reproduce the bug. The latest puppet 7 version is used as a server and agent

This is the ansible code used to invoke the module

- name: puppet run
  community.general.puppet:
    puppetmaster: "{{ ansible_fqdn }}"
    timeout: 60m
    verbose: true
    debug: true
    logdest: all
  register: puppet_agent_result
  until: puppet_agent_result.rc == 0

Expected Results

I expect that the puppet run finishes with return code 0 or 2 (puppet specifies this as success but changes were executed).

Actual Results

From the puppet logs

Error: Could not prefetch <module>: invalid byte sequence in US-ASCII

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@ansibullbot
Copy link
Collaborator

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
Copy link
Collaborator

cc @emonty
click here for bot help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug has_pr module module plugins plugin (any type)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants