win_regedit?

Hi,

I am trying to use Ansible to change Windows registry using win_regedit. I have this .yml:

`

  • name: Change app compatibility
    hosts: windows
    gather_facts: false
    tasks:
  • name: do regedit
    win_regedit:
    key: ‘HKCU:\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags’
    value: ‘{2b9034f3-b661-4d36-a5ef-60ab5a711ace}’
    data: 00000004
    datatype: dword

`

But when I run it I get:

`

[root@centos65 ansible_test]# ansible-playbook doregedit.yml
ERROR: win_regedit is not a legal parameter in an Ansible task or handler

`

What is causing this error (and how to fix it)?

Do I have to do something additional to install the win_regedit module because it’s an “extra”?

Thanks,
Jim

Hello Jim,

maybe you don’t use version 2 of Ansible?
http://docs.ansible.com/ansible/win_regedit_module.html
“New in version 2.0.”

esco

esco,

Oh. I just checked and I have 1.92, which is what I got from yum install.

Is the only way to get version 2 is to build from source then?

Thanks!

Jim

Hi,

Now I remember why I didn’t install from source. I’ll post a new thread about this…

Jim