-
Notifications
You must be signed in to change notification settings - Fork 252
Open
Labels
Description
NetBox version
v4.1.11
Feature type
New Module
Proposed functionality
Allow the use of the builtin configuration render feature directly via Ansible.
This new module provides better integration with Netbox's config render capabilities allowing to streamline automation processes via Ansible.
Proposed module signature:
netbox.netbox.netbox_config_render:
data:
device: "<device name>" # mutually exclusive to virtual_machine
virtual_machine: "<VM name>" # mutually exclusive to device
config_template: "<name of template>" # optional
dest: "<destination file to save the config>" # optional
Use case
We have multiple workflows of updating network devices via Netbox config render and Ansible to push the config out.
This will be the updated flow with this module.
- name: Render and save device config
netbox.netbox.netbox_config_render:
data:
device: "{{ inventory_hostname }}"
dest: "{{ inventory_hostname }}.cfg"
- name: load configure file into device
junipernetworks.junos.junos_config:
src: {{ inventory_hostname }}.cfg
comment: update config
External dependencies
N/A