27.01.2020 · Used the package: action which delegates to actual package manager. Enables a package install task to run on different OSes. Can't do update_cache that way, but yum doesn't need it when adding repos like apt does. Vars structure is dicts of OS family specific values. This enables the package and service names to be indexed by facts.
Installs, upgrade, downgrades, removes, and lists packages and groups with the yum package ... When specifying multiple repos, separate them with a "," .
Installing multiple packages in Ansible ... Add your handler logic to restart MongoDB in the file roles/mongo/handlers/main.yml . Write a Playbook called playbook ...
21.03.2019 · To my surprise I didn't find the simplest solution in all the answers, so here it is. Referring to the question title Installing multiple packages in Ansible this is (using the yum module ): - name: Install MongoDB yum: name: - mongodb-org-server - mongodb-org-mongos - mongodb-org-shell - mongodb-org-tools state: latest update_cache: true.
Ansible uses separate modules depending on OS, which means that writing a play that can install to multiple OSes requires lots of when: to check OS before ...
Ansible uses separate modules depending on OS, which means that writing a play that can install to multiple OSes requires lots of when: to check OS before install ...