Skip to content

Instantly share code, notes, and snippets.

@major
Last active August 29, 2015 14:04
Show Gist options
  • Save major/5e0a7fdd579f5db40e46 to your computer and use it in GitHub Desktop.
Save major/5e0a7fdd579f5db40e46 to your computer and use it in GitHub Desktop.
Ansible yum benchmarking
---
- hosts: chroot
vars:
- packages_to_install:
- bzip2
- chrony
- git
- less
- libselinux-utils
- lldpad
- logrotate
- lsof
- ltrace
- nano
- net-tools
- openssh-clients
- openssh-server
- parted
- pciutils
- policycoreutils
- policycoreutils-python
- postfix
- redhat-lsb
- rsync
- rsyslog
- selinux-policy-targeted
- setroubleshoot-server
- strace
- sudo
- sysstat
- tar
- tcpdump
- unzip
- vim
- xfsprogs
tasks:
- name: Install packages with yum module (state=present)
yum: name={{item}} state=present
with_items: packages_to_install
tags:
- yum-present
- name: Install packages with yum module (state=latest)
yum: name={{item}} state=latest
with_items: packages_to_install
tags:
- yum-latest
- name: Install packages with yum shell command
shell: yum -y install {{packages_to_install | join(" ")}}
tags:
- yum-shell
yum state=present,yum state=latest,yum via shell
93,94,39
94,94,39
94,95,40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment