Hi all,
I'm trying to run a module function from SLS state and put the output into a variable, but getting the following error: "Jinja variable 'function object' has no attribute 'items' ".
The output should be dictionary, and eventually I want to only get the key.
What am I missing?
My code example:
{% set sites = salt['win_iis.list_sites'].items() %}
When running the module from salt master I'm getting the following output and would like to use only the site name.
salt server_name state.show_sls iis
Server_name:
----------
Default Web Site:
----------
apppool:
DefaultAppPool
bindings:
----------
<ip>:443::
----------
certificatehash:
certificatestorename:
hostheader:
ipaddress:
<ip>
port:
443
protocol:
https
sslflags:
0
<ip>:80::
----------
certificatehash:
certificatestorename:
hostheader:
ipaddress:
<ip>
port:
80
protocol:
http
sslflags:
0
id:
1
sourcepath:
%SystemDrive%\inetpub\wwwroot
state:
Started
Thanks