How to install Ansible on Windows
To install Ansible on Windows, follow the steps below:
Download Cygwin and run the Cygwin installation file.
When asked which download source you’d like to use, select Install from Internet.
Select a root directory to install the application, for example,
C:\\cygwin64.Select a directory to install your Cygwin packages to.
Select the method that best suits your Internet connection type. For example, if you’re not using a proxy, select the Direct Connection option.
Select a mirror to download your packages from. Any option in the list will do. You’ll then be provided with a list of packages that you can download. Do not select anything, just click Next. Doing so will result in default applications being installed.
When asked, if you want to install dependencies, leave the default values, and click Next. This will install everything you need to get Cygwin up and running.
After the installation, open up the Cygwin terminal and run the following command:
alias cyg-get="/path/to/cygwin/setup/package/setup-x86_64.exe -q -P"In the Cygwin terminal, run the following command:
cyg-get cygwin32-gcc-g++,gcc-core,gcc-g++,git,libffi-devel,nano,openssl,openssl-devel,python-crypto,python3,python3-devel,python3-openssl,python3-pip,python3-setuptools,python3-devel,tree,wget,zip,makeUpgrade
pip:pip3 install --upgrade pipInstall Ansible with
pip:pip install ansible
Playbook example for Analytic Server installation
tasks:
- name: Unzip 'bi'
shell: "/usr/bin/unzip /cygdrive/c/tmp/WorkFusionAnalyticsInstaller-9.0.0.2.zip -d /cygdrive/c/tmp warn=False"
- name: Change permissions
shell: "chmod.exe -R 755 /cygdrive/c/tmp/WorkFusionAnalyticsServer/"
- name: Install 'bi' .
shell: '/cygdrive/c/tmp/WorkFusionAnalyticsServer/app/TableauServer-10-5-2-WorkFusion-64bit.exe /VERYSILENT /ACCEPTEULA /DIR="C:/tmp/workfusionserver"'
- name: Change 'host' .
shell: 'echo wgserver.trusted_hosts: wf.example.com >> "/cygdrive/c/tmp/workfusionserver/config/tabsvc.yml"'
- name: Change permissions for 'tabadmin' .
shell: "chown -R ec2-user /cygdrive/c/tmp/workfusionserver"
- name: Restart 'bi' .
shell: "cygstart --action=runas /cygdrive/c/tmp/workfusionserver/10.5/bin/tabadmin restart"
- name: Install 'mysql-connector' .
shell: "run msiexec /i /cygdrive/c/tmp/WorkFusionAnalyticsServer/app/mysql-connector-odbc-5.3.6-winx64.msi /passive"