]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
Configure CPAN and install Amazon::S3 on rhel 7
authorAndrew Schoen <aschoen@redhat.com>
Wed, 18 Mar 2015 19:13:30 +0000 (14:13 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Tue, 24 Mar 2015 00:18:50 +0000 (17:18 -0700)
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
roles/common/tasks/redhat/rhel_7.0.yml
roles/common/templates/cpan_config.pm [new file with mode: 0644]

index 7621eba29970280d165d2c58dab89b55eac19d4b..458a2b4cdfc30883a03031d2a04511ffdd99b862 100644 (file)
   hostname:
      name: "{{ new_hostname.stdout }}"
   when: existing_hostname.stdout.find("{{ lab_domain | mandatory }}") != -1
+
+- name: Add ubuntu CPAN config directory.
+  file:
+    path: /home/ubuntu/.cpan/CPAN/
+    owner: ubuntu
+    group: ubuntu
+    mode: 0755
+    recurse: yes
+    state: directory
+
+- name: Add root CPAN config directory.
+  file:
+    path: /root/.cpan/CPAN/
+    owner: root
+    group: root
+    mode: 0755
+    recurse: yes
+    state: directory
+
+- name: Upload CPAN config for ubuntu.
+  template:
+    src: ../../templates/cpan_config.pm
+    dest: /home/ubuntu/.cpan/CPAN/MyConfig.pm
+    owner: ubuntu
+    group: ubuntu
+    mode: 0755
+
+- name: Upload CPAN config for root.
+  template:
+    src: ../../templates/cpan_config.pm
+    dest: /root/.cpan/CPAN/MyConfig.pm
+    owner: root
+    group: root
+    mode: 0755
+
+- name: "Check to see if Amazon::S3 is installed."
+  command: "perldoc -l Amazon::S3"
+  register: cpan_check
+  ignore_errors: true
+  changed_when: false
+
+- name: "Install Amazon::S3."
+  command: "cpan  Amazon::S3"
+  when: cpan_check.rc != 0
diff --git a/roles/common/templates/cpan_config.pm b/roles/common/templates/cpan_config.pm
new file mode 100644 (file)
index 0000000..b295306
--- /dev/null
@@ -0,0 +1,67 @@
+# {{ ansible_managed }}
+$CPAN::Config = {
+  'applypatch' => q[],
+  'auto_commit' => q[0],
+  'build_cache' => q[100],
+  'build_dir' => q[/home/ubuntu/.cpan/build],
+  'build_dir_reuse' => q[0],
+  'build_requires_install_policy' => q[yes],
+  'bzip2' => q[/bin/bzip2],
+  'cache_metadata' => q[1],
+  'check_sigs' => q[0],
+  'colorize_output' => q[0],
+  'commandnumber_in_prompt' => q[1],
+  'connect_to_internet_ok' => q[1],
+  'cpan_home' => q[/home/ubuntu/.cpan],
+  'ftp_passive' => q[1],
+  'ftp_proxy' => q[],
+  'getcwd' => q[cwd],
+  'gpg' => q[/usr/bin/gpg],
+  'gzip' => q[/bin/gzip],
+  'halt_on_failure' => q[0],
+  'histfile' => q[/home/ubuntu/.cpan/histfile],
+  'histsize' => q[100],
+  'http_proxy' => q[],
+  'inactivity_timeout' => q[0],
+  'index_expire' => q[1],
+  'inhibit_startup_message' => q[0],
+  'keep_source_where' => q[/home/ubuntu/.cpan/sources],
+  'load_module_verbosity' => q[none],
+  'make' => q[/usr/bin/make],
+  'make_arg' => q[],
+  'make_install_arg' => q[],
+  'make_install_make_command' => q[/usr/bin/make],
+  'makepl_arg' => q[INSTALLDIRS=site],
+  'mbuild_arg' => q[],
+  'mbuild_install_arg' => q[],
+  'mbuild_install_build_command' => q[./Build],
+  'mbuildpl_arg' => q[--installdirs site],
+  'no_proxy' => q[],
+  'pager' => q[/usr/bin/less],
+  'patch' => q[/usr/bin/patch],
+  'perl5lib_verbosity' => q[none],
+  'prefer_external_tar' => q[1],
+  'prefer_installer' => q[MB],
+  'prefs_dir' => q[/home/ubuntu/.cpan/prefs],
+  'prerequisites_policy' => q[follow],
+  'scan_cache' => q[atstart],
+  'shell' => q[/bin/bash],
+  'show_unparsable_versions' => q[0],
+  'show_upload_date' => q[0],
+  'show_zero_versions' => q[0],
+  'tar' => q[/bin/tar],
+  'tar_verbosity' => q[none],
+  'term_is_latin' => q[1],
+  'term_ornaments' => q[1],
+  'test_report' => q[0],
+  'trust_test_report_history' => q[0],
+  'unzip' => q[/usr/bin/unzip],
+  'urllist' => [q[http://apt-mirror.front.sepia.ceph.com/CPAN/]],
+  'use_sqlite' => q[0],
+  'version_timeout' => q[15],
+  'wget' => q[/usr/bin/wget],
+  'yaml_load_code' => q[0],
+  'yaml_module' => q[YAML],
+};
+1;
+__END__