


Quotes is interpreted as a single argument even if it contains whitespace.Ī double quote preceded by a backslash \ is interpreted as just a double When running a command through win_command, the standard Windows argumentĮach argument is delimited by a white space, which can either be a space or aĪn argument can be surrounded by double quotes ". The installer as if it were run interactively on the host. Some installers like Microsoft Office or SQL Server require credential delegation orĪccess to components restricted by WinRM. # Install/uninstall with chocolatey - name : Ensure 7-Zip is installed via Chocolatey win_chocolatey : name : 7zip state : present - name : Ensure 7-Zip is not installed via Chocolatey win_chocolatey : name : 7zip state : absent # Install/uninstall with win_package - name : Download the 7-Zip package win_get_url : url : dest : C:\temp\7z.msi - name : Ensure 7-Zip is installed via win_package win_package : path : C:\temp\7z.msi state : present - name : Ensure 7-Zip is not installed via win_package win_package : path : C:\temp\7z.msi state : absent # Install/uninstall with win_command - name : Download the 7-Zip package win_get_url : url : dest : C:\temp\7z.msi - name : Check if 7-Zip is already installed win_reg_stat : name : HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ /qn /norestart when : 7zip_installed.exists = true Controlling how Ansible behaves: precedence rules.Virtualization and Containerization Guides.Controlling playbook execution: strategies and more.Executing playbooks for troubleshooting.Validating tasks: check mode and diff mode.Discovering variables: facts and magic variables.Working with language-specific version managers.Controlling where tasks run: delegation and local actions.Understanding privilege escalation: become.
