Re: [ansible-project] Getting command not found when executing using shell module

2020-03-17 Thread Stefan Hornburg (Racke)
On 3/17/20 8:05 AM, Shifa Shaikh wrote: > Here is my playbook: > > cat test.yml > > | > -name:Play2 >   hosts:targetserver >   tasks: > >     -copy:src=./centosscript.sh dest=~mode=775 >     -shell:~/centosscript.sh > | > > > Here is my shell script: > > cat centosscript.sh > | > #/bin/ksh >

[ansible-project] Getting command not found when executing using shell module

2020-03-17 Thread Shifa Shaikh
Here is my playbook: cat test.yml - name: Play 2 hosts: targetserver tasks: - copy: src=./centosscript.sh dest=~ mode=775 - shell: ~/centosscript.sh Here is my shell script: cat centosscript.sh #/bin/ksh grabip=`ip r | grep kernel` I also tried grabip=`ifconfig | grep inet`