#                                      ___            _        
#   ___ _ __   __ _ _ __ ___  _ __    / / |_ __ _ ___| | _____ 
#  / __| '_ \ / _` | '_ ` _ \| '_ \  / /| __/ _` / __| |/ / __|
# | (__| |_) | (_| | | | | | | | | |/ / | || (_| \__ \   <\__ \
#  \___| .__/ \__,_|_| |_| |_|_| |_/_/   \__\__,_|___/_|\_\___/
#      |_|                                                     
#
- name: main | Download cpanm
  register: getcpanm
  get_url: >
    url='http://xrl.us/cpanm'
    dest=/usr/local/bin/cpanm

- name: main | Install cpanm into /usr/local/bin/cpanm
  when: getcpanm.changed
  file: >
    path=/usr/local/bin/cpanm
    mode=0755
    owner=root

- name: main | Link /usr/bin/cpanm
  file: >
    src=/usr/local/bin/cpanm
    dest=/usr/bin/cpanm
    state=link


#                                      ___            _        
#   ___ _ __   __ _ _ __ ___  _ __    / / |_ __ _ ___| | _____ 
#  / __| '_ \ / _` | '_ ` _ \| '_ \  / /| __/ _` / __| |/ / __|
# | (__| |_) | (_| | | | | | | | | |/ / | || (_| \__ \   <\__ \
#  \___| .__/ \__,_|_| |_| |_|_| |_/_/   \__\__,_|___/_|\_\___/
#      |_|                                                     
#
- name: main | Download cpanm
  register: getcpanm
  get_url: >
    url='http://xrl.us/cpanm'
    dest=/usr/local/bin/cpanm

- name: main | Install cpanm into /usr/local/bin/cpanm
  when: getcpanm.changed
  file: >
    path=/usr/local/bin/cpanm
    mode=0755
    owner=root

- name: main | Link /usr/bin/cpanm
  file: >
    src=/usr/local/bin/cpanm
    dest=/usr/bin/cpanm
    state=link

- name: main | Install Perl core modules
  when: ansible_os_family == "RedHat"
  yum:  name=perl-core state=present


Install perl-core package on RedHat
Install perl-core package on RedHat
