Thank you,
the bypass solution I am finally using is to copy the dispatcher.sh into a
new file, then with the help of lineinfile, I insert after the #!/bin/ksh
first line the call of the .profile and when it is done I do remove this
temporary file:
- name: Copy du script dispatcher.sh
shell: cp /{{ rep_user }}/{{ openhrname }}/bin/dispatcher.sh /{{ rep_user
}}/{{ openhrname }}/bin/startdisp.sh
- lineinfile:
dest: /{{ rep_user }}/{{ openhrname }}/bin/startdisp.sh
regexp: "^exit 0"
insertafter: "#!/bin/ksh"
line: ". ~/.profile"
the startdisp.sh script does start with these lines:
#!/bin/ksh
. ~/.profile
Regards
Le mercredi 25 mai 2016 22:10:22 UTC+2, Paul Tötterman a écrit :
>
> You call this script instead of dispatcher.sh directly, like
>>
>
> And there's even the script-module:
> https://docs.ansible.com/ansible/script_module.html
>
> Cheers,
> Paul
>
>
--
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/7b07dff9-7e9b-4e47-8153-46675ae0bb5d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.