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?
How does your playbook / task look like? In the Git URL above you have savetogit.skylab.local,
but below you say you want to push to skylab.local.
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: