Closed sec0uth closed 3 years ago
I started with testing first, and to keep it simple, the validation over the configuration file will not be strict. Only required fields are going to be verified, the following fields:
ssh
:
host
changes
banner
or banner_file
user
:
name
config
or config_file
Note: the field at user.passwd
is also required, but the application take care of asking when missing
Finished juniper.config
module:
Branch yml-config-#11
Specification of main configuration file.
Logging
verbose
: iftrue
add debug log messages (defaultfalse
)console
: iftrue
send log messages to default terminal output (defaulttrue
)file
: if set, also send log messages to this target (defaultnull
)SSH
config
: ssh host configuration file (default:~/.ssh/config
)host
: either theHost
section of~/.ssh/config
or a host addresspasswd
: clear text password for sshask_passwd
: whether to ask for ssh passwordChanges
banner
: banner message textbanner_file
: read banner from fileuser
:name
: user name textpasswd
: user password in clear text. If missing, will ask for the password.class
: user login class, see default login classes at juniper docs. The default login class isread-only
.config
: text to be replaced in device configurationconfig_file
: file to be replaced in device configurationAdvanced
Mutually exclusive
SSH
ask_passwd
andpasswd
: if set to ask for ssh password but already has a password configured, it uses that passwordChanges
banner
andbanner_file
:banner
text takes precedence over the fileconfig
andconfig_file
: same as withbanner
andbanner_file