Created
October 3, 2014 06:38
-
-
Save hostmaster/db37c8e6c2a43997a224 to your computer and use it in GitHub Desktop.
Use OS specific package manager. Names of the packages may vary per distro/OS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: all | |
sudo: True | |
tasks: | |
# Load a variable file based on the OS type, or a default if not found. | |
- include_vars: "{{ item }}" | |
with_first_found: | |
- "{{ ansible_distribution }}.yml" | |
- "{{ ansible_os_family }}.yml" | |
- "default.yml" | |
- action: '{{ pkg_mgr }} name={{ item }} state=latest' | |
with_items: packages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pkg_mgr: apt | |
packages: | |
- bash | |
- screen | |
- curl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment