win_regedit?

158 views
Skip to first unread message

O haya

unread,
Aug 1, 2015, 8:05:34 AM8/1/15
to Ansible Project
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

esco real

unread,
Aug 2, 2015, 10:39:52 AM8/2/15
to Ansible Project
Hello Jim,

maybe you don't use version 2 of Ansible?
"New in version 2.0."

esco

O haya

unread,
Aug 2, 2015, 11:26:02 AM8/2/15
to Ansible Project
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

O haya

unread,
Aug 2, 2015, 12:30:48 PM8/2/15
to Ansible Project
Hi,

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

Jim
Reply all
Reply to author
Forward
0 new messages