Last active
February 13, 2016 21:49
-
-
Save phips/8183378 to your computer and use it in GitHub Desktop.
Install cpanm on vanilla CentOS 6 Vagrant box with Ansible
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: 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