Merged
Conversation
Owner
|
Hey man, that is an awesome addition Here is the rough config that shows that idea: credentials:
sros-pwd:
username: admin
password: admin
arista-key-based:
username: admin
private-key: /some/key.pub
transports:
default:
port: 22 # defaults to 22
ssh-config-file: /some/config # defaults to "~/.ssh/config"
strict-key: false # defaults to false
transport-type: standard # defaults to standard
custom:
port: 50022
strict-key: true
devices:
sros:
platform: nokia_sros
address: clab-scrapli-sros
credentials: sros-pwd # refer to one of the configured credentials (if not specified, credentials["default"] is assumed)
# omitting transport means apply transport defaults
send-commands:
- show version
- show router interface
eos:
platform: arista_eos
address: clab-scrapli-ceos
credentials: arista-key-based
transport: custom
send-commands:
- show version
- show uptimeWhat do you think? |
Contributor
Author
|
Dig it, will try to make this happen today 😁 ! |
Contributor
Author
|
Just pushed another update. Sorta ended up having a fair few changes that maybe should have been their own PR (sorry! I can break stuff out if you prefer!).
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sorry for PR without checking if you're even interested in this -- was just playing about with commando and had this so figured I'd raise this just in case you were interested!
TL;DR -- added defaults and "extras" to inventory yaml.
Defaults: fairly self explanatory -- figured rather than having to have username/password entered for every device having a default setting would be cool. The implementation is pretty basic -- just load a slice of options with the defaults coming first -- that way any device specific settings override the defaults.
Extras: could do without the "extras" parent, but basically its just "extra" stuff... hence the name. Things that folks probably wouldn't mess with too often -- port, auth strict key (I left
falseas the default, but now users can turn it on if they want), transport type (you know I love me the system transport! though this of course could break for windows users), ssh config file, and the secondary password (so we can deal with "enable" passwords).Carl