I have my playbook for CPAN. Right now it only works for Debian. I need it 
to work for SLES/RHEL/UBUNTU also but I don't know how to add them into the 
playbook. Can someone please help!


What I have:

cpan-modules.yaml 

--- 
- hosts: gen10alltools 
remote_user: root 
# Note: I am testing this script 
# The intended result is to increase speed to deploy new servers 
# by installing the needed CPAN modules through Ansible instead 
# of the old scripts from Build Admin. Copying requirements from: 
# E:\BuildAgent\buildagent\linux\matrix_update\12-cpan\SLES-12-x86_64.sh 
tasks: 
- name: copy MyConfig.pm to the correct directory on remote host(s) 
template: 
src: ../../../library/conf/debian/debian-myconfig.pm 
dest: /root/.cpan/CPAN/MyConfig.pm 
# - name: install CPANM so the next step can install all modules 
# zypper: 
# name: perl-App-cpanminus 
# state: present 
# Commented out the CPANM install because it...doesn't work right, 
# did manually by executing "cpan App::cpanminus" from our mirror 
# install needed CPAN modules 
# - cpanm: name={{ item }} 
- cpanm: 
name: "{{ item }}" 
with_items: 
- "HTTP::DAV" 
- "Log::Log4perl" 
- "SOAP::Lite" 
- "Digest::SHA1" 
- "AnyData" 
- "Log::Dispatch::FileRotate" 
- "Term::Shell" 
- "Crypt::RC4" 
environment: 
PERL_CPANM_OPT: "--mirror http://hCPAN2.sde.rdlabs.hpecorp.net/"; 
...

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/31ae91af-9d54-445c-8e1b-b583d284569c%40googlegroups.com.

Reply via email to