#ansible (2021-05)


Discussions related to ansible configuration management


Jaeson avatar

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

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

Pierre-Yves avatar

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

my small code to deploy chocolatey package


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

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

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

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

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