To install a Windows package using Ansible

Source: Internet
Author: User

Support EXE software package ansible module, collected 2:
Win_package (this time use this)
Official Document: Http://docs.ansible.com/ansible/latest/modules/win_package_module.html
Win_chocolatey
Official Document: Http://docs.ansible.com/ansible/latest/modules/win_chocolatey_module.html

For example, install the vc2013 (32-bit) package Vcredist_x86.exe:

    1. Since the Win_package module needs to be product_id, it is necessary to confirm the product_id and find the location:
      32-bit program: Hklm:software\wow6432node\microsoft\windows\currentversion\uninstall
      64-bit program: Hklm:software\microsoft\windows\currentversion\uninstall
      Note: HKLM is the abbreviation for HKEY_LOCAL_MACHINE

Install Vcredist_x86.exe manually to get product_id:
{13a4ee12-23ea-3371-91ee-efb36ddfff3e}

    1. Writing Playbook

      [[email protected] ~]# cat vc.yaml---- name: Install vcgather_facts: Falsehosts: alltasks:- name: install vc 2013  win_package:    path: D:\upload\vcredist_x86.exe    product_id: ‘{13A4EE12-23EA-3371-91EE-EFB36DDFFF3E}‘    arguments: /install /passive /norestart
    2. Executive Playbook
      Ansible-playbook Vc.yaml

Complete

To install a Windows package using Ansible

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.