New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new scp file #177
base: master
Are you sure you want to change the base?
new scp file #177
Conversation
Is it possible with this module to copy a file FROM the device ? it would be super useful to collect logs for example |
Not as of today but change will be minimum so I will take care of it ASAP. Boris |
I've updated my file in my own github to take care of put and get. I've tested it and it works ok. |
|
||
# <******************* | ||
# | ||
# Copyright 2016 Juniper Networks, Inc. All rights reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don;t think you can have 2 licenses for the same file : apache 2.0
and Juniper Networks Script Software License
Thanks a lot @renetbo this is gonna be very useful. Also, while reviewing it, I got couple of ideas that would make some great enhancements. Make the module idempotent
If the file has been created or changed, set the Support the --check option |
OK fixed./
From: Damien [mailto:notifications@github.com]
Sent: Wednesday, November 23, 2016 22:26
To: Juniper/ansible-junos-stdlib <ansible-junos-stdlib@noreply.github.com>
Cc: Boris Renet <brenet@juniper.net>; Mention <mention@noreply.github.com>
Subject: Re: [Juniper/ansible-junos-stdlib] new scp file (#177)
@dgarros commented on this pull request.
________________________________
In library/junos_scp_file<#177 (review)>:
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY Juniper Networks, Inc. ''AS IS'' AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL Juniper Networks, Inc. BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# <*******************
+#
+# Copyright 2016 Juniper Networks, Inc. All rights reserved.
I don;t think you can have 2 licenses for the same file : apache 2.0 and Juniper Networks Script Software License
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#177 (review)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AHWR3e109UN6rSzZ3r-GWnx78edFJs7Oks5rBK9dgaJpZM4Kz8Sj>.
|
Also it checks if the file is already present
added MD5 error diff from source to destination
OK I've updated the junos_scp_file so that, it can handle put, get and md5:
|
@renetbo Thanks for this pull request. |
@vnitinv This would be very useful. Can the PR be merged? |
@jeffbrl Agree. @stacywsmith whats your feedback. I think we should get in this functionality. |
I agree the functionality is useful. However, since we're in the process of a significant rewrite of the Ansible modules, I don't want to merge this just yet. Instead, I plan on implementing a new Merging this now would mean having to maintain backwards compatibility with something that's only been around for 1 to 2 weeks. I'd rather avoid that. |
@stacywsmith Ansible has implemented a module. that allows user to copy from/to Junos devices using SCP. Currently, PyEZ supports both SCP and FTP for file transfer. Should we go ahead with creating a new module for Juniper.junos role that supports both SCP and FTP or contribute to Ansible module by adding FTP support to |
@stacywsmith Any feedback on @rsmekala query? |
I personally would like to see a It would also be a copy which is initiated from the Junos device rather than from the Ansible control machine. For that reason, I believe it would be complimentary to the existing Ansible module which I believe only supports a copy from the Ansible control machine to the Junos host over SCP. |
I've been working on an update of this module which looks similar to what @stacywsmith is talking about |
Can one of the admins verify this patch? |
1 similar comment
Can one of the admins verify this patch? |
Hi,
I've created the junos_scp_file which sccp a file to a machine. This is necessary in fusion as you need to push a file to the Aggregation Device so that it can install it to the Satellite device (i.e. in Fusion you can't push it to the satellite and install it as you would do with junos_install_os)
Thanks
B