Skip to content

rConfig - Templates

5 mins V7 Pro V6 Core

Device Connection templates are used to specify connection and CLI settings for device types, when rConfig attempts to connect to devices. Lets go over some rules for templates;

  1. Multiple devices can use the same template
  2. One device can only be configured to use a single template
  3. Templates are configured in yaml and the specific details for key/ value pairs are on the github link below
  4. You can have unlimited templates
  5. If you create a working template for a device not in the repo above, please email it to [email protected] for inclusion in the repository so that others may use it.
  6. Templates are a common construct between all rConfig versions, therefore we are keeping the template repository open and on github rConfig V7 comes with 4 templates by default, which suit a lot of devices types. Though they are labeled Cisco. They frequently support other device manufacturers, but not always.

Main View

A quick look at the templates table will give you a view of the templates available. You can add a template, and import the full template repository.

Templates main view

Repository Import

We have made it really easy to import all rConfig templates from our repo in a single click. By clicking the Import button with the Github icon, rConfig will download the entire template repo for use when creating new templates.

Successful repo import

Create/Edit a template

Adding a template is pretty easy. Click New Template, change the file name and update the name: and desc: fields directly in the editor. You can then click the Save button to save the template. Just click the Edit icon in the main view to edit the template.

You may also click the ‘Create from Template’ link in the Add Template form to pre-populate the editor with a template as previously downloaded from the repo.

Notes on the YAML editor;

  1. All comments are prefixed with a ’#’ You can add as many comments as you like. You are advised to not remove default comments, but you can if you wish.
  2. Visit https://github.com/rconfig/rConfig-templates for detailed information on each key/value pairs.
  3. The username and password keys, must not contain your devices usernames/ passwords as values. The values for these are the username and password prompts
  4. This editor does not include a syntax checker, so be very careful for typos, extra spaces, and proper use quotations marks and indentation where required, and where they are not required. Formatting is important.
  5. You need enter a filename when creating a file. Recommended filename format should be as follows;

vendorName-ModelNumber-ConnectionType-isEnableModeOrNot.yml i.e. dell-6248-telnet-enable.yml

You can debug templates by assigning them to a test/dev device and running rConfig commands, per the CLI commands section later in these docs, to review if they require further development or tweaking.

Once a template is created, you can configure devices in the device management page to use these templates for connections.