M
M
mcrack2021-02-28 21:16:17
Windows
mcrack, 2021-02-28 21:16:17

How to install Ansible programs on windows 32 and 64 bits?

Hello, in connection with the departure from Active Directory to FreeIPA, the task was to install software on computers in bulk, there are about 200 computers in the organization, there are windows, there is linux, and every year linux will be introduced more and more due to import substitution.

So they advised me to use Ansible here, as I understand it, you can install programs and connect disks on both Windows and Linux.

QUESTION:
Can you tell me if it is possible to make such a check before installing programs on Windows:
If the bit depth is 64 bits, then install one msi package, if 32 bits, then another package?

Are there any examples of such playbooks?

And I also wanted to ask if it is possible to integrate ansible into FreeIPA? Pull all users from it to Ansible?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2021-02-28
@q2digger

I won’t answer about FreeIPA - I haven’t come across it, but about the architecture there is this:

---
- hosts: win
  gather_facts: true
#  ansible_connection: winrm
  tasks:

    name: Download and install application, 32 bit case
    win_package:
      path: 'https://download-cf.jetbrains.com/[path-of-the-32-bits-edition].exe'
      product_id: "PhpStorm"
      arguments: /S /install
      state: present
    when: ansible_architecture == "32 bits"

    name: Download and install application, 64 bit case
    win_package:
      path: 'https://download-cf.jetbrains.com/[path-of-the-64-bits-edition].exe'
      product_id: "PhpStorm"
      arguments: /S /install
      state: present
    when: ansible_architecture == "64 bits"

it's from here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question