Well, the controller I'm running the playbook from is RHEL 8 and has the 
following version:

ansible [core 2.14.6]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', 
'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.9/site-packages/ansible
  ansible collection location = 
/root/.ansible/collections:/usr/share/ansible/collections
  executable location = /bin/ansible
  python version = 3.9.16 (main, May 31 2023, 12:21:58) [GCC 8.5.0 20210514 
(Red Hat 8.5.0-18)] (/usr/bin/python3.9)
  jinja version = 3.1.2
  libyaml = True


I tweaked the playbook to only try to run to one host, and the -vvv does 
show this:

<server1> (127, b'/bin/sh: /usr/bin/python3: No such file or directory\r\n'

server1 is the RHEL 7 target, and /etc/ansible/hosts doesn't specify the 
ansible_interpreter.  I have "ansible_interpreter=/usr/bin/python3" on our 
RHEL 8 boxes in /etc/ansible/hosts.  So do I need to specify something 
specific for python 2.7.5 on those RHEL 7 hosts?

Thanks,
Harry
On Friday, September 8, 2023 at 9:30:58 AM UTC-4 Todd Lewis wrote:

> Maybe throw a few "-v"s on the command line and give us the job log? 
> Whether Python 2.7.5 is an issue will also depend on what version of 
> Ansible you are using, and we don't know that either. With the limited info 
> you've given, the only solution is to upgrade all your RHEL 7 servers to at 
> least RHEL 8, which isn't what you were asking I don't think.
>
> On Friday, September 8, 2023 at 9:15:51 AM UTC-4 [email protected] wrote:
>
>> We have the playbook below to copy an updated script to our servers.  The 
>> copy works to all RHEL 8 servers, but all RHEL 7 servers fails.  I know 
>> that the RHEL 7 servers has Python 2.7.5, could that be the issue?  I don't 
>> think that we can update Python on RHEL 7.
>>
>> ---
>> -  hosts: all_hosts
>>    become: yes
>>    become_method: sudo
>>    gather_facts: no
>>
>>    tasks:
>>
>>    - name: Send updated aide.check script
>>      ansible.builtin.copy:
>>        src: files/aide.check
>>        dest: /etc/cron.daily
>>
>> Thanks,
>> Harry
>>
>

-- 
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/a860503e-3561-4d4a-b12c-ea55c18dc1d3n%40googlegroups.com.

Reply via email to