Yes, but its two steps at the moment and the second step isn't idempotent. Try something like this:
# create the app pool first - name: Update/Create DefaultAppPool win_iis_webapppool: name: 'DefaultAppPool' state: started attributes: managedRuntimeVersion:v4.0|enable32BitAppOnWin64:true register: DefaultAppPool # then switch to running as a (domain) user - name: configure listed app pools to run as correct user win_command: 'C:\Windows\System32\inetsrv\appcmd.exe set config /section:applicationPools "/[name=''{{ item }}''].processModel.identityType:SpecificUser" "/[name=''{{ item }}''].processModel.userName:{{ fdomain }}\{{ user }}" "/[name=''{{ item }}''].processModel.password:{{ credential }}"' with_items: - DefaultAppPool - SomeOtherAppPool On Sunday, March 19, 2017 at 10:29:48 PM UTC, DevOps Unleashed wrote: > > Is it possible to use Ansible to create a new IIS Application Pool that > runs under a specific "identity"? > > Cheers > -- 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 ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/1cc01043-f949-4ebc-8b7e-be855780be75%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.