I can't explain the behaviour you are seeing but maybe some of the following will help.
Yes you are correct, state: absent is asking the module to ensure that IIS is not present. You also have 'restart: yes' set. I don't know off the top of my head if installing IIS requires a restart but perhaps the windows machine is restarting while you are attempting to run further playbooks (not sure if the module will wait for the restart to complete). That might account for some strange behaviour. You can also run ansible-playbook -v to get ansible to be more verbose about what its doing. There are several levels of debug information so if -v doesn't give any clues try -vvvvv My guess would be that the file that is being run by ansible is not the same as the one you are editing. One trick I use to debug situations where I think my edits aren't being noticed is to deliberately introduce a syntax error, so you could try deliberately breaking the yaml in your playbook. Hope this helps, Jon On Friday, January 16, 2015 at 9:09:32 PM UTC, Dimitri Yioulos wrote: > > All, > > I'm a newbie who's trying to get Ansible to work on a Windows Server > client. I followed instructions found here: > http://docs.ansible.com/intro_windows.html, and both the Linux-based > Ansible control server and Windows client seem to be set up properly. I > originally ran this example playbook (from > http://docs.ansible.com/win_feature_module.html): > > # Playbook example > --- > - name: Install IIS > hosts: all > gather_facts: false > tasks: > - name: Install IIS > win_feature: > name: "Web-Server" > state: absent > restart: yes > include_sub_features: yes > include_management_tools: yes > > Interestingly, it appeared to *uninstall* IIS. I'm guessing it's because of > the line "state: absent" (but I'm a newbie, so what do I know). So, then I > decided to change "absent" to "present", and started to get this error: > > Vault password: > sawintest01 | FAILED >> { > "failed": true, > "msg": "A parameter cannot be found that matches parameter name > 'IncludeManagementTools'." > } > > OK, so I removed the line "IncludeManagementTools". Now, every time I run > the playbook, I get the same error. And, if I create a new playbook to > install, say SNMP, the same error is still generated, despite the fact that > the line "IncludeManagementTools" isn't in the playbook (or any playbooks, > at this point). Huh? Why does Ansible keep whining about a parameter that > I'm not even including? What am I doing wrong here? > > Help would be most gratefully appreciated. > > Dimitri > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/1082d2eb-783b-44b8-971f-3b21cd12f0a5%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
