I.e.
instead of doing this which does win_iis_website,win_iis_website,etc then
win_iis_webbinding,win_iis_webbinding, etc
- name: Create IIS site
win_iis_website:
name: '{{ item.key }}'
state: started
application_pool: '{{ item.value.application_pool }}'
physical_path: '{{ item.value.physical_path }}'
with_dict: "{{ sites }}"
- name: Bind Site
win_iis_webbinding:
name: '{{ item.key }}'
protocol: https
ip: '{{ ansible_ip_addresses[0] }}'
port: '{{ item.value.http_port }}'
certificate_hash: '{{ item.value.cert_thumbprint }}'
with_dict: "{{ sites }}"
I would like to do this so that the win_iis_webbinding is called
immediately after win_iis_website instead of calling
win_iis_website,win_iis_website,etc then win_iis_webbinding,
win_iis_webbinding, etc
- block:
- name: Create IIS site
win_iis_website:
name: '{{ item.key }}'
state: started
application_pool: '{{ item.value.application_pool }}'
physical_path: '{{ item.value.physical_path }}'
- name: Bind Site
win_iis_webbinding:
name: '{{ item.key }}'
protocol: https
ip: '{{ ansible_ip_addresses[0] }}'
port: '{{ item.value.http_port }}'
certificate_hash: '{{ item.value.cert_thumbprint }}'
with_dict: "{{ sites }}"
tags: webapp
However I got this
ERROR! 'with_dict' is not a valid attribute for a Block
--
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/6ec9c113-fbed-46db-9098-cc84a0008b18%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.