Advertisement
QualibreInfo

Untitled

Jan 12th, 2022
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.05 KB | None | 0 0
  1. # Remove Default Web Site and the standard port 80 binding
  2. - name: "Get infos on Default Web Site"
  3.   win_iis_website:
  4.     name: "Default Web Site"
  5.   register: default_website
  6.  
  7. - name: Display infos on default website
  8.   debug:
  9.     var: default_website
  10.  
  11. - name: "Configure website"
  12.   win_iis_website:
  13.     name: Maincare
  14.     state: started
  15.     port: 80
  16.     ip: 127.0.0.1
  17.     hostname: maincare.com
  18.     application_pool: acme
  19.     physical_path: C:\sites\maincare
  20.     parameters: logfile.directory:C:\sites\logs
  21.   register: website
  22.  
  23. # Remove Default Web Site and the standard port 80 binding
  24. - name: Remove Default Web Site
  25.   win_iis_website:
  26.     name: "Default Web Site"
  27.     state: absent
  28.  
  29. - name: Import a certificate
  30.   ansible.windows.win_certificate_store:
  31.     path: C:\Temp\cert.pem
  32.     state: present
  33.   register: imported_certificate
  34.  
  35. - name: Add a HTTPS binding
  36.   win_iis_webbinding:
  37.     name: Maincare
  38.     protocol: https
  39.     port: 443
  40.     ip: 127.0.0.1
  41.     certificate_hash: "{{ imported_certificate.thumbprint }}"
  42.     state: present
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement