community.windows.win_iis_webapppool
该模块用来查看和启动停止和重启 windows IIS 的服务
example
- name: Return information about an existing application poolcommunity.windows.win_iis_webapppool:name: DefaultAppPoolstate: present- name: Create a new application pool in 'Started' statecommunity.windows.win_iis_webapppool:name: AppPoolstate: started- name: Stop an application poolcommunity.windows.win_iis_webapppool:name: AppPoolstate: stopped- name: Restart an application pool (non-idempotent)community.windows.win_iis_webapppool:name: AppPoolstate: restarted- name: Change application pool attributes using new dict stylecommunity.windows.win_iis_webapppool:name: AppPoolattributes:managedRuntimeVersion: v4.0autoStart: no- name: Creates an application pool, sets attributes and starts itcommunity.windows.win_iis_webapppool:name: AnotherAppPoolstate: startedattributes:managedRuntimeVersion: v4.0autoStart: no# In the below example we are setting attributes in child element processModel# https://www.iis.net/configreference/system.applicationhost/applicationpools/add/processmodel- name: Manage child element and set identity of application poolcommunity.windows.win_iis_webapppool:name: IdentitiyAppPoolstate: startedattributes:managedPipelineMode: ClassicprocessModel.identityType: SpecificUserprocessModel.userName: '{{ansible_user}}'processModel.password: '{{ansible_password}}'processModel.loadUserProfile: true- name: Manage a timespan attributecommunity.windows.win_iis_webapppool:name: TimespanAppPoolstate: startedattributes:# Timespan with full string "day:hour:minute:second.millisecond"recycling.periodicRestart.time: "00:00:05:00.000000"recycling.periodicRestart.schedule: ["00:10:00", "05:30:00"]# Shortened timespan "hour:minute:second"processModel.pingResponseTime: "00:03:00"
ansible-console
win_iis_webapppool name=
