Skip to content

Instantly share code, notes, and snippets.

@phips
Last active February 13, 2016 21:49
Show Gist options
  • Save phips/8183378 to your computer and use it in GitHub Desktop.
Save phips/8183378 to your computer and use it in GitHub Desktop.
Install cpanm on vanilla CentOS 6 Vagrant box with Ansible
---
- hosts: default
user: vagrant
gather_facts: false
sudo: true
tasks:
- name: Ensure gcc installed
yum: name=gcc state=present
- name: Test for cpanm
shell: perl -MApp::cpanminus -e1
register: result
ignore_errors: true
- name: Install CPANm
shell: curl -L http://cpanmin.us | perl - App::cpanminus
when: result|failed
- name: Ensure required Perl modules installed
yum: name={{ item }} state=present
with_items:
- perl-Test-Harness
- perl-Time-HiRes
# vim: set ts=2 sw=2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment