On 7/24/19 3:01 PM, Keith Mills wrote:
> 
>   Ansible playbook error: 
>   
> <https://stackoverflow.com/questions/53576865/ansible-playbook-error-failed-to-find-required-executable-mysql-in-paths>Failed
>   to find required executable cpanm in paths: 
> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
> 

Hello Keith,

where is your cpanm executable installed?

Regards
          Racke

> 
> 
> Ansible Version:
> 
> ansible 2.8.0
>   config file = /etc/ansible/ansible.cfg
>   configured module search path = 
> [u'/home/jamekeit/.ansible/plugins/modules', 
> u'/usr/share/ansible/plugins/modules']
>   ansible python module location = /usr/lib/python2.7/site-packages/ansible
>   executable location = /usr/bin/ansible
>   python version = 2.7.5 (default, May 31 2018, 09:41:32) [GCC 4.8.5 20150623 
> (Red Hat 4.8.5-28)]
> 
> 
> cpan-modules.yaml 
> 
> ---
>       - hosts: testservers
>       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/MyConfig-Debian.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://hCPAN1.sde.rdlabs.hpecorp.net/";
>       ...
> 
> 
> 
> 
> PLAY [gen10alltools]
> *****************************************************************************************************************************************************
> 
> TASK [Gathering Facts]
> ***************************************************************************************************************************************************
> ok: [hwbldeb10]
> 
> TASK [copy MyConfig.pm to the correct directory on remote host(s)]
> *******************************************************************************************************
> ok: [hwbldeb10]
> 
> TASK [cpanm]
> *************************************************************************************************************************************************************
> failed: [hwbldeb10] (item=HTTP::DAV) => {"ansible_loop_var": "item", 
> "changed": false, "item": "HTTP::DAV", "msg":
> "Failed to find required executable cpanm in paths: 
> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"}
> failed: [hwbldeb10] (item=Log::Log4perl) => {"ansible_loop_var": "item", 
> "changed": false, "item": "Log::Log4perl",
> "msg": "Failed to find required executable cpanm in paths: 
> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"}
> failed: [hwbldeb10] (item=SOAP::Lite) => {"ansible_loop_var": "item", 
> "changed": false, "item": "SOAP::Lite", "msg":
> "Failed to find required executable cpanm in paths: 
> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"}
> failed: [hwbldeb10] (item=Digest::SHA1) => {"ansible_loop_var": "item", 
> "changed": false, "item": "Digest::SHA1", "msg":
> "Failed to find required executable cpanm in paths: 
> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"}
> failed: [hwbldeb10] (item=AnyData) => {"ansible_loop_var": "item", "changed": 
> false, "item": "AnyData", "msg": "Failed
> to find required executable cpanm in paths: 
> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"}
> failed: [hwbldeb10] (item=Log::Dispatch::FileRotate) => {"ansible_loop_var": 
> "item", "changed": false, "item":
> "Log::Dispatch::FileRotate", "msg": "Failed to find required executable cpanm 
> in paths:
> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"}
> failed: [hwbldeb10] (item=Term::Shell) => {"ansible_loop_var": "item", 
> "changed": false, "item": "Term::Shell", "msg":
> "Failed to find required executable cpanm in paths: 
> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"}
> failed: [hwbldeb10] (item=Crypt::RC4) => {"ansible_loop_var": "item", 
> "changed": false, "item": "Crypt::RC4", "msg":
> "Failed to find required executable cpanm in paths: 
> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"}
> 
> PLAY RECAP
> ***************************************************************************************************************************************************************
> hwbldeb10            : ok=2    changed=0    unreachable=0    failed=1    
> skipped=0    rescued=0    ignored=0
> 
> -- 
> 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] 
> <mailto:[email protected]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/933b1b03-e1ee-4f72-a6de-93f8ff6c19fa%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/933b1b03-e1ee-4f72-a6de-93f8ff6c19fa%40googlegroups.com?utm_medium=email&utm_source=footer>.


-- 
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.

-- 
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/ccc5e23b-1fa2-c4df-5c87-beb0efb40043%40linuxia.de.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to