win_regedit; binary data

36 views
Skip to first unread message

J Hawkesworth

unread,
Feb 25, 2016, 5:18:29 AM2/25/16
to Ansible Project
Hi,

Does anyone have an example of using win_regedit to set binary data?

I have a hex encoded string from a reg export but so far not found a way to convert it to whatever powershell needs.

Many thanks,

Jon

J Hawkesworth

unread,
Feb 25, 2016, 9:47:38 AM2/25/16
to Ansible Project
To follow up, it appears you need to convert the incoming data to a byte array.  I have some prototype code that can do this and will tidy up the code and create a pull request to add this when I get the chance.  If anyone else hits this before the PR is available let me know and I'll send you a modified version of win_regedit.

All the best,

Jon

J Hawkesworth

unread,
Apr 15, 2016, 3:43:14 AM4/15/16
to Ansible Project
It's been a while, but as promised, pull request to fix working with binary registry data here:

 https://github.com/ansible/ansible-modules-extras/pull/2034

Also integration tests added for win_regedit here: https://github.com/ansible/ansible/pull/15422

I tested against Server 2008 R2 and Server 2012 R2 so if anyone has other windows versions they could test against, I'd be very grateful.

Many thanks,

Jon
Reply all
Reply to author
Forward
0 new messages