On 4/2/20 12:08 PM, lolO lolO wrote: > Hello Racke, > > here 's my git tasks: > ===== > tasks: > - name: git local actions > shell: | > git config --global user.name "savetogit@babel.local" > git add -A > git commit -m "Ajout des nouveaux fichiers au repo" > exit 0 > > args: > chdir: "{{ workingdir }}" > > - name: git push to remote > shell: "git push > git@savetogit.skylab.local:savetogit/devbackupdesconfigs.git" > > args: > chdir: "{{ workingdir }}" > > > register: gitcommand_return > changed_when: gitcommand_return.stdout is not search('nothing to > commit') > failed_when: "'FAILED' in gitcommand_return.stderr" > > ==== > > my gitlab server is skylab.local > the syntax *git push > git@savetogit.skylab.local:savetogit/devbackupdesconfigs.git *allows to push > with another ssh user > credential (user = savetogit) > it works fine in console >
I think the correct push command for the remote user savetogit would be: git push savetogit@skylab.local:savetogit/devbackupdesconfigs.git Regards Racke > > > > > Le jeudi 2 avril 2020 09:35:01 UTC+2, lolO lolO a écrit : > > Hello all ! > > it's been a while i have troubles with the shell module: > as a command is correctly executed in console (even launched as the user > awx) > > /git push git@savetogit.skylab.local:savetogit/devbackupdesconfigs.git/ > > but fails through the playbook execution with the output > > i've already tried a lot of changes (character protection, command line > in variable, local script) > same issue > the output is > ssh: Could not resolve hostname savetogit.skylab.local: Name or service > not know > > any idea why such a parsing? > > --- > the aim is to push to a remote git (skylab.local) > as the user 'savetogit' > this works perfectly ion console > > thanks > > -- > 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 > ansible-project+unsubscr...@googlegroups.com > <mailto:ansible-project+unsubscr...@googlegroups.com>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/0fc9cc86-18b4-457e-880f-296d255c4eb0%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/0fc9cc86-18b4-457e-880f-296d255c4eb0%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 ansible-project+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/b3c69d9d-6611-2d1e-13fa-60b2140557bb%40linuxia.de.
signature.asc
Description: OpenPGP digital signature