-
Notifications
You must be signed in to change notification settings - Fork 111
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
Encode json payload to UTF-8 in send_facts() #46
Conversation
There were the following issues with the commit message:
If you don't have a ticket number, please create an issue in Redmine, selecting the appropriate project. More guidelines are available in Coding Standards or on the Foreman wiki. This message was auto-generated by Foreman's prprocessor |
There were the following issues with the commit message:
If you don't have a ticket number, please create an issue in Redmine, selecting the appropriate project. More guidelines are available in Coding Standards or on the Foreman wiki. This message was auto-generated by Foreman's prprocessor |
On Wed, Sep 07, 2016 at 12:53:00PM -0700, Michael Hofer wrote:
Your /usb/bin/python is a Python3? The change is harmless in python2.7 |
I've tested it on a Jessie running Python 2.7.9:
Running Foreman 1.12.1 and Foreman Ansible Plugin 1.0. |
On Wed, Sep 07, 2016 at 10:30:47PM -0700, Michael Hofer wrote:
That's odd since I'm using the same version but maybe my facts are all |
[test] |
Ready to merge if Jenkins tests pass |
I've encountered the following error when using the Ansible callback plugin to upload facts:
[WARNING]: Failure when attempting to use callback plugin (</home/foobar/.ansible/plugins/callback_plugins/foreman_callback.CallbackModule object at 0x7f32cd4c96d0>): buf must be a byte string
The environment variables are configured as follows:
Encoding the JSON payload to UTF-8 fixed the issue and I was able to upload facts to Foreman. Maybe this has to be fixed on line 161 as well.
The PR definitely needs to be reviewed because I didn't had time to thoroughly test it.