There'd be no harm in putting the server in the inventory ( with ansible_ssh_user set to the restricted user) if you want to take advantage of the built-in mechanisms. Nothing says everything in the inventory has to be actively managed by Ansible.
Pull the file locally at the start of the play and push it up to wherever. On 2 November 2016 at 00:27, <[email protected]> wrote: > Hi all, > > > How to get fetch files from non-inventory servers ? > > After searching in docs for 2 days, I cannot find any explicit scp/sftp > module. > This could be due to fact that ansible already does file transfers bw > servers by scp/sftp. > > But I want to fetch some file on ansible server every time a playbook is > run. from a server thats not in inventory file. > I have setup a restricted user ( with password ) on sftp server. > > > > Right now I download that file via https > > - name: Download release from "{{https_release_url}}" > get_url: url="{{https_release_url}}" url_username="{{https_deploy_user}}" > url_password="{{https_deploy_pass}}" force=yes validate_certs=no > dest="{{playbook_dir}}/release/latest-release.aes" > > > I want this transfer over sftp. > Any help /advise / pointer in right direction is highly welcome. > > I am on ansible 2.1.0.0 if that matters. > > Thanks, > Kapil > > -- > 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/d5eb1042-d613-4b8e-87e5-3ca8e330e91a%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- 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/CAK5eLPSyan%3DMxYZAJkDtvqc0%2BuY_FYaiJM-ZiEp3enUyQqNp-w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
