#ansible (2021-05)

ansible

Discussions related to ansible configuration management

2021-05-12

2021-05-11

Jaeson avatar
Jaeson

Hi. I’m using ansible to install a slew of dependencies for a build server of an app written in 2013 … I’m looking at win_package, and currently scratching my head over the product_id field. I’m also considering trying to look up the dependencies on chocolatey, but I didn’t get a real great feeling about using it for an organization. I’ve read the documentation, but I’m not windows-saavy enough to understand it.

Pierre-Yves avatar
Pierre-Yves

Hi, here is my two cents: recently chocolatey was done for maintenance, preventing me to deploy some tool for a few hours. there is an option to mirror the package

1
Pierre-Yves avatar
Pierre-Yves

one other point that come to my mind, is that the destination folder of some chocolatey package is that is not easy to guess .

Pierre-Yves avatar
Pierre-Yves

my small code to deploy chocolatey package

---

- name: install multiple packages sequentially
  win_chocolatey:
    name: '{{ item }}'
    state: present
    package_params: '{{ package_params }}'
  loop:
    - "{{ chocolatey_package_names }}"
  register: install_tools

- name: "install multiple package result"
  debug:
    var: install_tools
    verbosity: 3
  tags:
  - log
sheldonh avatar
sheldonh

With AWS? I used an ssm association and you can use Apply-DSCMof’s or Apply-PowerShellScript and run choco installs this way.

I used to manage 200+ instances. It’s got some quirks but it’s one of the less painful devops tooling for installs.

And yes, they throttle public repo, so use a service to cache calls if using public.

sheldonh avatar
sheldonh

I personally feel using ansible to manage windows packages adds some complexity, but YMMV.

Also consider evaluating Distributor if basic installs and leverage SSM Distributor to do something similar.

sheldonh avatar
sheldonh

For a build of an old app it also sounds like you’d want to vendor all those dependencies if it’s not being continually updated and needs static old assemblies. This would be able to be packaged up in a choco package or distributor

    keyboard_arrow_up