ansible.posix icon indicating copy to clipboard operation
ansible.posix copied to clipboard

synchronize: get {"msg": "Could not find the shell plugin required (bash)."}

Open mamh2021 opened this issue 2 years ago • 1 comments

SUMMARY

run one playbook like below:

---                        
- hosts: centos     
  become: False    
  gather_facts: False
  tasks:
    - name: "Synchronize and delete files for categraf"
      ansible.posix.synchronize:
        src: /work/jenkins/workspace/categraf/
        dest: categraf/
        delete: yes
        recursive: yes


inventory.conf :

[centos]
10.0.12.105

python -u ansible-playbook -i inventory.conf categraf.yaml

fatal: [10.0.12.105]: FAILED! => {"msg": "Could not find the shell plugin required (bash)."}

my ansible.cfg file set executable = /bin/bash

if i add vars to playbook yaml file like below:

  vars:
    - ansible_shell_executable: /bin/sh
    - ansible_shell_type: sh

it also dit not work

ISSUE TYPE
  • Bug Report
COMPONENT NAME
ANSIBLE VERSION
ansible-playbook [core 2.12.1] 

python version = 3.8.13 (default, Mar 28 2022, 11:38:47) [GCC 7.5.0]
jinja version = 3.0.3
libyaml = True



COLLECTION VERSION
the ansible.posix  "version": "1.3.0",

CONFIGURATION

OS / ENVIRONMENT
STEPS TO REPRODUCE

EXPECTED RESULTS
ACTUAL RESULTS

mamh2021 avatar Oct 13 '22 03:10 mamh2021

Is there an update to this Issue? I myself is running into this problem right now.

double-em avatar Sep 20 '23 05:09 double-em